Search
 
SCRIPT & CODE EXAMPLE
 

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);
Comment

PREVIOUS NEXT
Code Example
Javascript :: make form submit on new tab using jquery 
Javascript :: javascript replace p tags with new line 
Javascript :: js compare values of two arrays 
Javascript :: add table row jquery 
Javascript :: node app 
Javascript :: nodejs delete s3 folder 
Javascript :: js html tag valu 
Javascript :: loop through an array in js 
Javascript :: javascript convert a number in string 
Javascript :: @babel/plugin-proposal-optional-chaining 
Javascript :: javascript Swapping Variables 
Javascript :: moment get iso week number 
Javascript :: scroll to top 
Javascript :: preloader js code 
Javascript :: create new element 
Javascript :: .NET number values such as positive and negative infinity cannot be written as valid JSON. 
Javascript :: mongodb push to index 
Javascript :: how to get the size of the window in javascript 
Javascript :: random code generator 
Javascript :: jQuery onclick not firing on dynamically inserted HTML elements 
Javascript :: If statement discord js 
Javascript :: how make date object in jquery from custom date 
Javascript :: javascript convert string with square brackets to array 
Javascript :: js add animation to element 
Javascript :: js class exists 
Javascript :: useeffect dependency error 
Javascript :: jquery select option by value 
Javascript :: for of loop in es6 
Javascript :: is jwt token expired 
Javascript :: how to read a file in javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =