Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
How can I multiple Strings with Integers in Javascript as in python, if we cant what's the reason and is there any other way to do so?
#Python Code
characters = "Hello World!"
print(characters * 4)  #it Will Print Hello World! 4 times

// Javascript Code
characters = "Hello World!"
console.log(characters * 4)
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

In javascript you can use the inbuilt property 'repeat' of a string

characters = "Hello World!";
console.log(characters.repeat(4));
about 4 years ago · Juan Pablo Isaza Report

0

You can use repeat().

const chorus = 'Hello World! ';
console.log(`${chorus.repeat(4)}`);

Edit: Use the other person's reply instead of mine, it's way simpler

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!