From 9e5ce858bd66cb134a846be4d4e48a80193ae8b0 Mon Sep 17 00:00:00 2001 From: Jose Cruz Date: Mon, 29 Jun 2020 16:58:43 -0400 Subject: [PATCH 1/3] finished 4 out of the 5 problems, will push solution to the other later --- assets/js/shapes.js | 101 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/assets/js/shapes.js b/assets/js/shapes.js index e4351ba..b5acd9b 100644 --- a/assets/js/shapes.js +++ b/assets/js/shapes.js @@ -1,31 +1,130 @@ function getLine(length) { - // TODO - write method definition here + i=0; + let v1="" ; + while(i0) + { + for(i;j Date: Tue, 30 Jun 2020 08:56:48 -0400 Subject: [PATCH 2/3] almost done with the 5th just a new line problem --- assets/js/shapes.js | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/assets/js/shapes.js b/assets/js/shapes.js index b5acd9b..b9b86c6 100644 --- a/assets/js/shapes.js +++ b/assets/js/shapes.js @@ -86,43 +86,37 @@ function getPyramid(length) { function getCheckerboard(width, height) { // TODO - write method definition here - i = 0; - j = 0; + i = 1; + j = 1; let v1 = "" - while(i Date: Tue, 30 Jun 2020 09:04:44 -0400 Subject: [PATCH 3/3] Finished, we saved America --- assets/js/shapes.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/js/shapes.js b/assets/js/shapes.js index b9b86c6..9342e7f 100644 --- a/assets/js/shapes.js +++ b/assets/js/shapes.js @@ -116,9 +116,8 @@ function getCheckerboard(width, height) { } j = 1; ++i - if (i <= height) { - v1 += "\n" - } + v1 += "\n" + } return v1; }