About 68,900 results
Open links in new tab
  1. How to multiply a string as many as X times in JavaScript

    Apr 10, 2021 · There are three ways you can multiply the string above: Using the String.repeat() method; Using a for loop; Using a while loop; This article will help you to learn how to use all …

  2. Repeat a string in JavaScript a number of times - Stack Overflow

    /** * Repeat a string `n`-times (recursive) * @param {String} s - The string you want to repeat. * @param {Number} n - The times to repeat the string. * @param {String} d - A delimiter …

  3. String.prototype.repeat() - JavaScript | MDN - MDN Web Docs

    Mar 13, 2025 · The repeat () method of String values constructs and returns a new string which contains the specified number of copies of this string, concatenated together.

  4. JavaScript String repeat() Method - W3Schools

    The repeat() method returns a string with a number of copies of a string. The repeat() method returns a new string. The repeat() method does not change the original string.

  5. How to Multiply a String in JavaScript - Sabe.io

    Oct 22, 2022 · In this post, we looked at three ways to multiply a string in JavaScript. Your options are to use the built-in repeat() method, use a for loop, or use a while loop.

  6. Three ways to repeat a string in JavaScript - freeCodeCamp.org

    Feb 13, 2017 · There are the three approaches I’ll cover: Repeat a given string (first argument) num times (second argument). Return an empty string if num is not a positive number.

  7. How to Multiply Strings JavaScript - Itsourcecode.com

    Aug 25, 2023 · Learn how to multiply strings JavaScript effectively. This article covers different methods and tips for performing string multiplication in JavaScript.

  8. JavaScript Operators - W3Schools

    Javascript operators are used to perform different types of mathematical and logical computations. Examples: The Assignment Operator = assigns values. The Addition Operator + …

  9. javascript - Multiply strings - Stack Overflow

    May 7, 2025 · If you are trying to multiply two strings, then your code meets integer overflow issue. You shouldn't compute the result product in an integer, just use a string as a container …

  10. How to multiply strings in javascript - Javascript code example

    Are you looking for a code example or an answer to a question «how to multiply strings in javascript»? Examples from various sources (github,stackoverflow, and others).

  11. Some results have been removed
Refresh