In Perl, if you want to repeat a text N times, you can do $a = "a" x 10;
aaaaaaaa' It's like this, but is there anything like this in JavaScript?
Array(11).join("a") //"aaaaaaaaaa"
"a".repeat(10) // "aaaaaaaaaa"
© 2024 OneMinuteCode. All rights reserved.