标签: javascript
非常简单的javascript问题。
我有两个值value1 = 20和value2 = 30
value1 = 20
value2 = 30
如何为bigger_number变量赋值更高的值?
bigger_number
答案 0 :(得分:2)
var bigger_number = Math.max(value1, value2);
答案 1 :(得分:1)
答案 2 :(得分:1)
点击谷歌搜索会引用Math.max
例如:
Math.max([value1[,value2[, ...]]])