-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update setting-the-length-of-an-array.md #2535
base: master
Are you sure you want to change the base?
Update setting-the-length-of-an-array.md #2535
Conversation
Changelog
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some formatting and copy changes
javascript/javascript-core/javascript-arrays/setting-the-length-of-an-array.md
Outdated
Show resolved
Hide resolved
javascript/javascript-core/javascript-arrays/setting-the-length-of-an-array.md
Outdated
Show resolved
Hide resolved
javascript/javascript-core/javascript-arrays/setting-the-length-of-an-array.md
Outdated
Show resolved
Hide resolved
javascript/javascript-core/javascript-arrays/setting-the-length-of-an-array.md
Outdated
Show resolved
Hide resolved
javascript/javascript-core/javascript-arrays/setting-the-length-of-an-array.md
Outdated
Show resolved
Hide resolved
@@ -5,6 +5,8 @@ category: hack | |||
tags: | |||
- introduction | |||
- obscura | |||
links: | |||
- '[Array holes](https://medium.com/better-programming/what-are-holes-in-arrays-3ac5fcbcd1c){website}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @nem035 if there's a better link for this
- size | ||
- `[1,2,undefined,undefined,undefined]` | ||
- `[1,2,<3 empty items>]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe leave this one as undefined
- `[1,2,<3 empty items>]` | |
- `[1, 2, undefined, undefined]` | |
- `[1, 2, <1 empty item>, <1 empty item>]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Undefined, undefined] or [<1empty sitem> , <1 empty item>]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, nvm I think I got it. The first correct answer should be:
[1, 2, <1 empty item>, <1 empty item>]
and the incorrect one should be
[1, 2, undefined, undefined]
right? @sourabhv
…h-of-an-array.md Co-authored-by: Andrei Calabangiu <andrei@enki.com>
…h-of-an-array.md Co-authored-by: Andrei Calabangiu <andrei@enki.com>
…h-of-an-array.md Co-authored-by: Andrei Calabangiu <andrei@enki.com>
…h-of-an-array.md Co-authored-by: Andrei Calabangiu <andrei@enki.com>
…h-of-an-array.md Co-authored-by: Andrei Calabangiu <andrei@enki.com>
…h-of-an-array-javascript-core-arrays
@Stefan-Stojanovic what's left to do for this PR? |
I wasn't sure what to change based on sourabhs comment and was waiting on the reply |
No description provided.