Created
June 2, 2015 21:26
-
-
Save steve54b/488e5072ba73ecd880d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The value between the two adjacent commas is shown as "undefined" in the response to entry of arr = [1,2,,4] (see section "1st "write some code"). However, as the answer to the 2nd part of this task (see below the dotted line) demonstrates, it appears that undefined equates to a null. | |
1st "write some code": | |
> arr = [1,2, ,4] | |
==> [1,2,undefined × 1,4] | |
> arr[1] | |
==> 2 | |
>arr[2] | |
==> undefined | |
--------------------------- | |
[1,2,undefined,4].toString() === [1,2,,4].toString() | |
==> true | |
or | |
[1,2,null,4].toString() === [1,2,,4].toString() | |
==> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment