Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

all javascript pattern programs

let n = 5; // row or column count
// defining an empty string
let string = "";

for(let i = 0; i < n; i++) { // external loop
  for(let j = 0; j < n; j++) { // internal loop
    string += "*";
  }
  // newline after each row
  string += "
";
}
// printing the string
console.log(string);
Source by www.tutorialstonight.com #
 
PREVIOUS NEXT
Tagged: #javascript #pattern #programs
ADD COMMENT
Topic
Name
9+9 =