Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Downward Triangle Star Pattern in JavaScript

// Downward Triangle Star Pattern in JavaScript
let numberDown = 5;
let stringDown = ''; 
for (let i=1; i<=numberDown; i++){
  for(let j=i; j<=numberDown; j++){
    stringDown += '*';
  }
  stringDown += '
';
}
console.log(stringDown);
 
PREVIOUS NEXT
Tagged: #Downward #Triangle #Star #Pattern #JavaScript
ADD COMMENT
Topic
Name
9+1 =