From c40612041809fe289aba58aefa170bbe784aba1f Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:07 +0800 Subject: remove name attribute for zh-CN --- .../javascript/reference/global_objects/math/max/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/math/max') diff --git a/files/zh-cn/web/javascript/reference/global_objects/math/max/index.html b/files/zh-cn/web/javascript/reference/global_objects/math/max/index.html index 593776318e..73e3914dce 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/math/max/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/math/max/index.html @@ -12,11 +12,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/max

{{EmbedInteractiveExample("pages/js/math-max.html")}}

-

语法

+

语法

Math.max(value1[,value2, ...]) 
-

参数

+

参数

value1, value2, ...
@@ -27,7 +27,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/max

返回给定的一组数字中的最大值。如果给定的参数中至少有一个参数无法被转换成数字,则会返回 {{jsxref("NaN")}}。

-

描述

+

描述

由于 maxMath 的静态方法,所以应该像这样使用:Math.max(),而不是创建的 Math 实例的方法(Math 不是构造函数)。

@@ -35,9 +35,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/max

如果有任一参数不能被转换为数值,则结果为 {{jsxref("NaN")}}。

-

示例

+

示例

-

使用 Math.max()

+

使用 Math.max()

Math.max(10, 20);   //  20
 Math.max(-10, -20); // -10
@@ -92,7 +92,7 @@ var max = Math.max(...arr);
 
 

{{Compat("javascript.builtins.Math.max")}}

-

相关链接

+

相关链接

  • {{jsxref("Math.min()")}}
  • -- cgit v1.2.3-54-g00ecf