Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Square star pattern in JavaScript

// Square star pattern  in JavaScript
let numberSquare = 5;
let stringSquare = '';
for(let i=1; i<=numberSquare; i++){
  for(let j=1; j<=numberSquare; j++){
    stringSquare += '*';
  }
  stringSquare += '
';
}
console.log(stringSquare);
 
PREVIOUS NEXT
Tagged: #Square #star #pattern #JavaScript
ADD COMMENT
Topic
Name
5+3 =