fill array with values javascript

JavaScript
let filledArray = new Array(10).fill({'hello':'goodbye'});new Array(5).fill('element')
// ["element", "element", "element", "element", "element"]
Source

Also in JavaScript: