Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



In this article, I’ll explain how to solve freeCodeCamp’s “Repeat a string repeat a stringchallenge. This involves repeating a string a certain number of times.

There are the three approaches I’ll cover:

  1. using a while loop
  2. using recursion
  3. using ES6 repeat() method
If you want to change selection, open document below and click on "Move attachment"

Three ways to repeat a string in JavaScript – freeCodeCamp
amp | https://sonyamoisset.github.io Feb 13 Three ways to repeat a string in JavaScript In this article, I’ll explain how to solve freeCodeCamp’s “Repeat a string repeat a string” challenge. This involves repeating a string a certain number of times. There are the three approaches I’ll cover: using a while loop using recursion using ES6 repeat() method The Algorithm Challenge Description Repeat a given string (first argument) num times (second argument). Return an empty string if num is not a positive number. < cl


Summary

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Details



Discussion

Do you want to join discussion? Click here to log in or create user.