Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. 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.
  2. 1st "write some code":
  3. > arr = [1,2, ,4]
  4. ==> [1,2,undefined × 1,4]
  5. > arr[1]
  6. ==> 2
  7. >arr[2]
  8. ==> undefined
  9. ---------------------------
  10. [1,2,undefined,4].toString() === [1,2,,4].toString()
  11. ==> true
  12. or
  13. [1,2,null,4].toString() === [1,2,,4].toString()
  14.  
  15.  
  16. ==> true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement