interview-answe icon indicating copy to clipboard operation
interview-answe copied to clipboard

224. min()和 max()方法

Open webVueBlog opened this issue 4 years ago • 1 comments

[js]

webVueBlog avatar May 05 '20 23:05 webVueBlog

min()和 max()方法用于确定一组数值中的最小值和最大值

var max = Math.max(3, 54, 32, 16); 
alert(max); //54 
var min = Math.min(3, 54, 32, 16); 
alert(min); //3

webVueBlog avatar May 05 '20 23:05 webVueBlog