diff --git a/assets/js/shapes.js b/assets/js/shapes.js index e4351ba..fd33c44 100644 --- a/assets/js/shapes.js +++ b/assets/js/shapes.js @@ -1,29 +1,78 @@ function getLine(length) { // TODO - write method definition here + let output = ""; + for (let i=0; i=length; i--) { + output=output + getLine(i) + "\n"; + } + return output; } function getPyramid(length) { // TODO - write method definition here + for(var i=1; i<=length; i++) +{ +for(var k=1; k<=( length-i ); k++) +{ +return (" "); +} +for(var j=1; j<=i; j++) +{ +return("* "); } +return("
"); +} + + return output; +} + + function getCheckerboard(width, height) {