Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. //This is what you put
  2. array = [];
  3. array["string"] = "whatever....";
  4. array["blah"] = "whatever as well...";
  5. getArrayKeys(array)[0] would equal "string"
  6. getArrayKeys(array)[1] would equal "blah"
  7.  
  8. //Now if i did this
  9. array = [];
  10. array["blah"] = "whatever....";
  11. array["string"] = "whatever as well...";
  12. getArrayKeys(array)[0] would equal "blah"
  13. getArrayKeys(array)[1] would equal "string"
  14.  
  15. //Is that correct?
  16. //I switched the blah & string, Why did string come first as the key 0, was it because you set key 0 first..? That what im asking.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement