Guest User

Untitled

a guest
Mar 6th, 2018
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 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. var contacts = [
  13. {
  14. firstName: "John",
  15. lastName: "Doe",
  16. phone: "(512) 355-0453",
  17. email: "johndoe@email.com"
  18. },
  19. {
  20. firstName:"Jane",
  21. lastName: "Doe",
  22. phone: "(312) 641-2203",
  23. email: "janedoe@email.com",
  24. },
  25. {
  26. firstName: "Suzie",
  27. lastName: "Smith",
  28. phone: "(415) 604-4219",
  29. email: "suziesmith@email.com",
  30. },
  31. ]
  32.  
  33. var listContacts = function () {
  34. for (var i=0; i < contacts.length; i++){
  35. console.log(contacts[i].email);
  36. }
  37. };
  38. listContacts();
  39. </script>
  40.  
  41.  
  42.  
  43. <script id="jsbin-source-javascript" type="text/javascript">// Write your code below this line
  44. var contacts = [
  45. {
  46. firstName: "John",
  47. lastName: "Doe",
  48. phone: "(512) 355-0453",
  49. email: "johndoe@email.com"
  50. },
  51. {
  52. firstName:"Jane",
  53. lastName: "Doe",
  54. phone: "(312) 641-2203",
  55. email: "janedoe@email.com",
  56. },
  57. {
  58. firstName: "Suzie",
  59. lastName: "Smith",
  60. phone: "(415) 604-4219",
  61. email: "suziesmith@email.com",
  62. },
  63. ]
  64.  
  65. var listContacts = function () {
  66. for (var i=0; i < contacts.length; i++){
  67. console.log(contacts[i].email);
  68. }
  69. };
  70. listContacts();
  71. </script></body>
  72. </html>
Add Comment
Please, Sign In to add comment