Replace all items in an array with the same value.
npm install replace-array-items
const replaceArrayItems = require("replace-array-items");
replaceArrayItems([1, "a", null], "Hello");
//=> ["Hello", "Hello", "Hello"]
Type: array
The array to modify.
Type: any
The value to set all the items to.