Array Creation

Report a typo

Create a function named createNewArray that accepts three arguments, i.e. value, start, end. Use the fill() method to create a new array from the originalArr.

Sample Input 1:

3
0
8

Sample Output 1:

[ 3, 3, 3, 3, 3, 3, 3, 3 ]
Write a program in JavaScript
const originalArr = [3, 6, 0, 1, 4, 6, 8, 112];
// write code here
___

Create a free account to access the full topic