Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. if("hello".indexOf("world")) { // I forgot to add > -1 here
  2. console.log("hello world");
  3. }
  4.  
  5. +-----------------------------------------------------------------------+
  6. | Argument Type | Result |
  7. |:--------------|------------------------------------------------------:|
  8. | Undefined | false |
  9. |---------------|-------------------------------------------------------|
  10. | Null | false |
  11. |---------------|-------------------------------------------------------|
  12. | Boolean | The result equals the input argument (no conversion). |
  13. |---------------|-------------------------------------------------------|
  14. | Number | The result is false if the argument is +0, −0, or NaN;|
  15. | | otherwise the result is true. |
  16. |---------------|-------------------------------------------------------|
  17. | String | The result is false if the argument is the empty |
  18. | | String (its length is zero); otherwise the result is |
  19. | | true. |
  20. |---------------|-------------------------------------------------------|
  21. | Object | true |
  22. +-----------------------------------------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement