Guest User

Untitled

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