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
const inventors = [ | |
{ first: 'Albert', last: 'Einstein', year: 1879, passed: 1955 }, | |
{ first: 'Isaac', last: 'Newton', year: 1643, passed: 1727 }, | |
{ first: 'Galileo', last: 'Galilei', year: 1564, passed: 1642 }, | |
{ first: 'Marie', last: 'Curie', year: 1867, passed: 1934 }, | |
{ first: 'Johannes', last: 'Kepler', year: 1571, passed: 1630 }, | |
{ first: 'Nicolaus', last: 'Copernicus', year: 1473, passed: 1543 }, | |
{ first: 'Max', last: 'Planck', year: 1858, passed: 1947 }, | |
{ first: 'Katherine', last: 'Blodgett', year: 1898, passed: 1979 }, |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Array Cardio 💪</title> | |
</head> | |
<body> | |
<p><em>Psst: have a look at the JavaScript Console</em> 💁</p> | |
<script> | |
// Get your shorts on - this is an array workout! |
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
// ----------- | |
// W/ CONSTRUCTOR | |
// --------- | |
// The constructor pattern is reccomened for this use case, because | |
// you only have to define the function once, then every Object | |
// will have access to that function. | |
function ZodiacInfo(sign, dates, element) { | |
this.sign = sign; | |
this.dates = dates; | |
this.element = element; |