-
-
Save Bijesse/8a9298ab9518cb7550722e86ecbbed24 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/kohazi
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> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> | |
| var hero = | |
| spiderman: { | |
| codename:"Spiderman", | |
| identity:"Peter Parker", | |
| power:"strength, spidey sense, wall-crawling", | |
| isHero:true | |
| } | |
| }; | |
| // delete hero.isHero; | |
| // console.log(hero.isHero); | |
| hero.spiderman.codename = "Spider-Man"; | |
| /* | |
| hero.nemesis = "Venom"; | |
| for (var key in hero){ | |
| console.log(hero[key]); | |
| } | |
| // console.log(hero.nemesis); | |
| */ | |
| /* | |
| How do I print out the hero's identity? | |
| How do I change the hero's codename? | |
| How do I add another property? | |
| How do I remove isHero? | |
| How do I print each value in our object without having to access each one individually? | |
| How would I store more than one hero? (Objects within objects!) | |
| */ | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">var hero = | |
| spiderman: { | |
| codename:"Spiderman", | |
| identity:"Peter Parker", | |
| power:"strength, spidey sense, wall-crawling", | |
| isHero:true | |
| } | |
| }; | |
| // delete hero.isHero; | |
| // console.log(hero.isHero); | |
| hero.spiderman.codename = "Spider-Man"; | |
| /* | |
| hero.nemesis = "Venom"; | |
| for (var key in hero){ | |
| console.log(hero[key]); | |
| } | |
| // console.log(hero.nemesis); | |
| */ | |
| /* | |
| How do I print out the hero's identity? | |
| How do I change the hero's codename? | |
| How do I add another property? | |
| How do I remove isHero? | |
| How do I print each value in our object without having to access each one individually? | |
| How would I store more than one hero? (Objects within objects!) | |
| */</script></body> | |
| </html> |
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
| var hero = | |
| spiderman: { | |
| codename:"Spiderman", | |
| identity:"Peter Parker", | |
| power:"strength, spidey sense, wall-crawling", | |
| isHero:true | |
| } | |
| }; | |
| // delete hero.isHero; | |
| // console.log(hero.isHero); | |
| hero.spiderman.codename = "Spider-Man"; | |
| /* | |
| hero.nemesis = "Venom"; | |
| for (var key in hero){ | |
| console.log(hero[key]); | |
| } | |
| // console.log(hero.nemesis); | |
| */ | |
| /* | |
| How do I print out the hero's identity? | |
| How do I change the hero's codename? | |
| How do I add another property? | |
| How do I remove isHero? | |
| How do I print each value in our object without having to access each one individually? | |
| How would I store more than one hero? (Objects within objects!) | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment