Math.max(1,2,3,4,5) What I want to know is how I can get and use this (1,2,3,4,5).
For example:
var a = [1,2,3,4,5]
var b = Math.max(a)
NaN
I want to use Math.max to get
威尼斯2018-05-14 09:31:17
var a = [1,2,3,4,5];
var b = Math.max(...a);
es6 extended operator , you can go to Baidu to find out