Guest User

Untitled

a guest
Jul 17th, 2018
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>JS Bin</title>
  7. </head>
  8. <body>
  9.  
  10. <script id="jsbin-javascript">
  11. // Write your code below this line
  12.  
  13. var contacts = [
  14. {
  15. firstname:"John",
  16. lastname: "Doe",
  17. phone:"(512) 355-0453",
  18. email: "johndoe@email.com",
  19. },
  20. {
  21. firstname:"Jane",
  22. lastname:"Doe",
  23. phone:"(312) 641-2203",
  24. email: "janedoe@email.com",
  25. },
  26. {
  27. firstname:"Suzie",
  28. lastname:"Smith",
  29. phone:"(415) 604-4219",
  30. email: "suziesmith@email.com",
  31. },
  32. ]
  33.  
  34. for (var i = 0; i < contacts.length; i++){
  35. console.log(contacts[i].firstname);
  36. }
  37. </script>
  38.  
  39.  
  40.  
  41. <script id="jsbin-source-javascript" type="text/javascript">// Write your code below this line
  42.  
  43. var contacts = [
  44. {
  45. firstname:"John",
  46. lastname: "Doe",
  47. phone:"(512) 355-0453",
  48. email: "johndoe@email.com",
  49. },
  50. {
  51. firstname:"Jane",
  52. lastname:"Doe",
  53. phone:"(312) 641-2203",
  54. email: "janedoe@email.com",
  55. },
  56. {
  57. firstname:"Suzie",
  58. lastname:"Smith",
  59. phone:"(415) 604-4219",
  60. email: "suziesmith@email.com",
  61. },
  62. ]
  63.  
  64. for (var i = 0; i < contacts.length; i++){
  65. console.log(contacts[i].firstname);
  66. }</script></body>
  67. </html>
Add Comment
Please, Sign In to add comment