diff options
author | t7yang <t7yang@gmail.com> | 2022-01-10 08:38:07 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | 563ca0a35e98678e2b7d5f154f31f496851e8d60 (patch) | |
tree | 7c99e7e037128217eca2080df671a742076c615b /files/zh-cn/web/javascript/reference/global_objects/math/sign | |
parent | d7b2995cabe8d85a1827aa18bc270bdf739f3d13 (diff) | |
download | translated-content-563ca0a35e98678e2b7d5f154f31f496851e8d60.tar.gz translated-content-563ca0a35e98678e2b7d5f154f31f496851e8d60.tar.bz2 translated-content-563ca0a35e98678e2b7d5f154f31f496851e8d60.zip |
remove code tag inside pre tag for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/math/sign')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/math/sign/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/math/sign/index.html b/files/zh-cn/web/javascript/reference/global_objects/math/sign/index.html index 60808dde44..590089e3c1 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/math/sign/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/math/sign/index.html @@ -50,12 +50,12 @@ Math.sign(); // NaN <h2 id="Compatibility" name="Compatibility">Polyfill</h2> -<pre class="brush: js language-js"><code class="language-js">function sign(x) { +<pre class="brush: js language-js">function sign(x) { x = +x ;// convert to a number if (x === 0 || isNaN(x)) return x; return x > 0 ? 1 : -1; -}</code></pre> +}</pre> <p> </p> |