fill js method code example Example: array js fill let filledArray = new Array(10).fill({'hello':'goodbye'});