8.
Which of the following is a valid way to create an array with a specific length filled with undefined values?
var arr = Array();
var arr = [];
var arr = new Array(5);
var arr = [undefined, undefined, undefined, undefined, undefined];
Correct: C
To create an array with a specific length, you can use the "Array()" constructor with the desired length as an argument. This will create an array filled with undefined values. The array literal syntax "[]" and "new Array()" without a length argument will create an empty array. Using the "new Array()" constructor with a length argument is the correct way to create an array with a specific length filled with undefined values.