Last active
December 16, 2015 09:49
-
-
Save verdi327/5416025 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function newspaper(name, left, top, width, height) { | |
this.name = name; | |
this.left = left; | |
this.top = top; | |
this.width = width; | |
this.height = height; | |
} | |
var nyTimes = new newspaper('nytimes', 200, 440, 1400, 800); | |
var laTimes = new newspaper('latimes', 500, 200, 1000, 900); | |
var bbc = new newspaper('bbc', 500, 500, 400, 600); | |
var newspapers = [nyTimes, laTimes, bbc]; | |
for (var i=0; i < newspapers.length; i++ ) { | |
console.log(newspapers[i].name) | |
console.log(newspapers[i].left) | |
console.log(newspapers[i].top) | |
console.log(newspapers[i].width) | |
console.log(newspapers[i].height) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment