Advertisement
Guest User

Untitled

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