javascript max is not a function error code example Example: javascript index of biggest number arr.indexOf(Math.max(...arr))