Last active
July 5, 2016 16:07
-
-
Save cloverich/6f9d1149c02648bc06563a53e05f6514 to your computer and use it in GitHub Desktop.
This file contains 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
// console.log can be used to print information to the screen | |
console.log("Hello, World"); // prints "Hello, World" | |
// Create an object `foodItem` to hold some information | |
var foodItem = { | |
fat: 25, | |
carbs: 82 | |
} | |
// fat and carbs are now stored insode of foodItem | |
console.log(fat); // prints undefined | |
console.log(foodItem.fat); // prints 25 | |
var isGoodForYou = (foodItem.fat < 20 && foodItem.carbs < 50) ? true : false; | |
var isGoodForYou2 = foodItem.fat < 20 && foodItem.carbs < 50; | |
console.log(isGoodForYou2 === isGoodForYou); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment