diff --git a/assets/js/footer-functions.js b/assets/js/footer-functions.js index 42cc05b..a6ff491 100644 --- a/assets/js/footer-functions.js +++ b/assets/js/footer-functions.js @@ -24,7 +24,7 @@ function getBoxTests() { function getBottomLeftTriangleTests() { testGetBottomLeftTriangle("*", 1); testGetBottomLeftTriangle("*\n**", 2); - testGetBottomLeftTriangle("*\n**\n**", 3); + testGetBottomLeftTriangle("*\n**\n***", 3); } function getUpperLeftTriangleTests() { diff --git a/assets/js/shapes.js b/assets/js/shapes.js index e4351ba..2849d01 100644 --- a/assets/js/shapes.js +++ b/assets/js/shapes.js @@ -1,31 +1,106 @@ function getLine(length) { // TODO - write method definition here + //length= prompt("Please Enter desired line length"); + if(length==1){ + return "*"; + }else if(length==2){ + return "**"; + }else return "***"; } - function getBox(width, height) { - // TODO - write method definition here -} + let output=""; + for(let i=0;i