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 captainMarvel = { | |
| givenName: 'Carol Danvers', | |
| nickname: 'Vers', | |
| age: 41, | |
| sideburns: false, | |
| affiliations: ["The Avengers", "S.H.I.E.L.D.", "The Starjammers"], | |
| fly() { | |
| console.log('zoom!'); | |
| console.log('swish!'); | |
| console.log('fweeee!'); |
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 coffeePrice = function coffeePrice(isIced, size, flavorArray){ | |
| let price = 2.50; | |
| if(size == 0){ | |
| ; | |
| } else if (size == 1) { | |
| price += 1; | |
| } else { | |
| price *= 2; | |
| } |
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
| def coffee_price is_iced, size, flavor_array | |
| price = 2.50 | |
| if size == 0 | |
| elsif size == 1 | |
| price += 1 | |
| else | |
| price *= 2 | |
| end |
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
| import Backbone from 'backbone'; | |
| var Task = Backbone.Model.extend({ | |
| defaults: { | |
| title: '', | |
| completed: false | |
| }, | |
| logStatus: function() { | |
| console.log("Title: " + this.get("title")); | |
| console.log("Completed: " + this.get("completed")); |