Repeat string in JavaScript

'a'.repeat(3) // 'aaa'