Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <p id="demo1"></p>
- <p id="demo2"></p>
- <script>
- var reccords = {1:{1:[10,'zorro'],2:[25,'ro']}, 2:{1:[20,"dim"]}}
- var time=5;
- reccords[3] = {time:[2, 'michel']}; //time isn't considered as a variable
- document.getElementById("demo2").innerHTML = reccords[3]['time'][0];
- document.getElementById("demo1").innerHTML = reccords[3][5][0]; //does not work, how to make it work?
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment