Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 44 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,45 @@
// // No of Emojis
// var main = function (input) {
// var noOfEmojis = Number(input);
// var myOutputValue = '';
// var counter = 0
// while (counter < input) {
// counter += 1;
// myOutputValue += '👍';
// }
// return myOutputValue
// }

// // Square
// var main = function (input) {
// var myOutputValue = '';
// var sideLength = Number(input);
// var columnCounter = 0;
// while (columnCounter < sideLength) {
// var rowCounter = 0;
// while (rowCounter < sideLength) {
// rowCounter += 1;
// myOutputValue += '👍';
// }
// myOutputValue += '<br>';
// columnCounter += 1;
// }
// return myOutputValue;
// };

// Triagle
var main = function (input) {
var myOutputValue = 'hello world';
return myOutputValue;
};
var numberOfRows = Number(input);
var counter = 0;
var myOutputValue = '';
while (counter < numberOfRows) {
var innerCounter = 0;
while (innerCounter <= counter) {
innerCounter += 1
myOutputValue += '👍';
}
counter += 1;
myOutputValue += '<br>'
}
return myOutputValue
}