Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>JS Bin</title>
- </head>
- <body>
- <script id="jsbin-javascript">
- // Write your code below this line
- var contacts = [
- {
- firstname:"John",
- lastname: "Doe",
- phone:"(512) 355-0453",
- email: "johndoe@email.com",
- },
- {
- firstname:"Jane",
- lastname:"Doe",
- phone:"(312) 641-2203",
- email: "janedoe@email.com",
- },
- {
- firstname:"Suzie",
- lastname:"Smith",
- phone:"(415) 604-4219",
- email: "suziesmith@email.com",
- },
- ]
- for (var i = 0; i < contacts.length; i++){
- console.log(contacts[i].firstname);
- }
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">// Write your code below this line
- var contacts = [
- {
- firstname:"John",
- lastname: "Doe",
- phone:"(512) 355-0453",
- email: "johndoe@email.com",
- },
- {
- firstname:"Jane",
- lastname:"Doe",
- phone:"(312) 641-2203",
- email: "janedoe@email.com",
- },
- {
- firstname:"Suzie",
- lastname:"Smith",
- phone:"(415) 604-4219",
- email: "suziesmith@email.com",
- },
- ]
- for (var i = 0; i < contacts.length; i++){
- console.log(contacts[i].firstname);
- }</script></body>
- </html>
Add Comment
Please, Sign In to add comment