array js fill

JavaScript
let filledArray = new Array(10).fill({'hello':'goodbye'});
Source

Also in JavaScript: