An array can be created using the array function or array literal notation. The array literal notation is preferred for creating arrays.