Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

string.length和array.length,是否只读 #485

Open
alanhe421 opened this issue Apr 18, 2024 · 0 comments
Open

string.length和array.length,是否只读 #485

alanhe421 opened this issue Apr 18, 2024 · 0 comments

Comments

@alanhe421
Copy link
Owner

alanhe421 commented Apr 18, 2024

const str='JavaScript';
str.length = 4;
console.log(str);
console.log(str.length);
const items = ['JavaScript', 'Python'];
items.length = 1;
console.log(items);
console.log(items.length);
@alanhe421 alanhe421 changed the title length只读 string.length和array.length,是否只读 Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant