how to declare an array value as null javascript code example Example: javascript create array with null values const arr = new Array(5).fill(null);