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"
- }
- ];
- var listContacts = function() {
- for (var i = 0; i < contacts.length; i++) {
- console.log(contacts[i].firstName + " " + contacts[i].lastName);
- }
- };
- </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"
- }
- ];
- var listContacts = function() {
- for (var i = 0; i < contacts.length; i++) {
- console.log(contacts[i].firstName + " " + contacts[i].lastName);
- }
- };</script></body>
- </html>
Add Comment
Please, Sign In to add comment