Created
August 15, 2017 04:12
-
-
Save rbarner14/2997f51d9c6f164211b01f58d59e5264 to your computer and use it in GitHub Desktop.
Revisions
-
Ryan created this gist
Aug 15, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ console.log('Remember the Titans'); function billTotal(subtotal) { var tip = subtotal * 0.15; var tax = subtotal * 0.095; return subtotal + tip + tax; } billTotal(10); function range(start, end) { var array = []; for (var i = start; i < end; i++) { array.push(i); } return array; } range(10, 2); var person = { name : { first : "Alyssa", middle: "P.", last: "Hacker" }, age : 26 } function getFullName (object) { for(var propName in object) { if(object.hasOwnProperty(propName)) { propValue = object[propName]; for(var key in propValue) { var value = propValue[key]; } for(var key3 in propValue) { var value3 = propValue[key3]; } for(var key2 in propValue) { var value2 = propValue[key2]; return value2 + " " + value; } } } } getFullName(person);