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.
Array creation
Array Creation
Report a typo
Sample Input 1:
3
0
8Sample 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
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.