Actually repeat is easy to read
If you want to make string of 52 a's with repeat is so easy
const a = 'a'.repeat(52); console.log(a); // "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" console.log(a.length); // 52
Array index starts from 0 which means it will print 52 times.
Yass, and since join acts as 'glue', using 'a' as glue for 52 nothings will print 'a' 51 times. Give it a try ;)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Actually repeat is easy to read
If you want to make string of 52 a's with repeat is so easy
Array index starts from 0 which means it will print 52 times.
Yass, and since join acts as 'glue', using 'a' as glue for 52 nothings will print 'a' 51 times. Give it a try ;)