Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Multiply string using a for loop

let multi = 2;
let str = "Little lamb";
let multiStr = "";

for(let i = 0; i < multi; i++){
  multiStr += str
}
console.log(multiStr); // "Little lambLittle lamb"
Comment

PREVIOUS NEXT
Code Example
Javascript :: convert string to slug javascript 
Javascript :: javascript process.env.key with  
Javascript :: single page application example javascript 
Javascript :: cannot set headers after they are sent to the client mongoose 
Javascript :: switch javascript to java 
Javascript :: theme ui with react 17 
Javascript :: empty table rows html js site:stackoverflow.com 
Javascript :: change y scale phaser 
Javascript :: link change page react 
Javascript :: phaser rotate container facing point 
Javascript :: phaser generate frame names 
Javascript :: School paperwork 
Javascript :: scrolling text animation javascript 
Javascript :: npm deploy next js with tailwind 
Javascript :: get random hsl color js 
Javascript :: efectos javascript 
Javascript :: Return characters in a string in alphabetic order 
Javascript :: check if value is a string javascript 
Javascript :: shallow copy and deep copy in javascript 
Javascript :: class declaration in javascript 
Javascript :: what is slot in vue.js 
Javascript :: create a class variable js 
Javascript :: js functional ajax requests 
Javascript :: in javascript pass infinite argument in function 
Javascript :: smooth scroll jquery 
Javascript :: using for loops js 
Javascript :: alert react native 
Javascript :: base 8 number javascript 
Javascript :: hide checkbox jquery 
Javascript :: button is not calling js function 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =