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
var lines; | |
var length = tiers; | |
function buildTriangle(tiers){ | |
var triangle = ""; | |
for (var h = 1; h <= tiers; h++) { | |
lines = function makeLine(length) { | |
var line = ""; | |
for (var j = 1; j <= length; j++) { |
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
var lines; | |
function buildTriangle(height){ | |
var triangle = ""; | |
var length = height; | |
for (var h = 1; h <= height; h++) { | |
lines = function makeLine(length) { | |
var line = ""; | |
for (var j = 1; j <= length; j++) { |
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
function laugh(num){ | |
var repeatedString = ""; | |
var string = "ha"; | |
while (num > 0){ | |
repeatedString += string; | |
num--; | |
} | |
return repeatedString; |
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
/* | |
* Programming Quiz: Back to School (3-9) | |
*/ | |
// change the value of `education` to test your code | |
var education = "an Associate's degree"; | |
// set the value of this based on a person's education | |
var salary = ""; |