Answers for "star print in javascript"

1

star print in javascript

for(var i=1; i<=4; i++){
   console.log("*".repeat(i));
}

/*
Output is: 
"*"
"**"
"***"
"****"
*/
Posted by: Guest on May-04-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language