mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Correction: jsguide.html - Changed null to undefined
## This change is "Not important". Please don't review this leaving your work behind. ## Change description Keys not defined in an Object are undefined. ``` javascript const o = {width: 42}; o.maxWidth === null // false o.maxWidth === undefined // true ```
This commit is contained in:
parent
1ec490aaef
commit
9e752536b4
|
@ -1413,7 +1413,7 @@ if (o.hasOwnProperty('maxWidth')) {
|
||||||
|
|
||||||
<pre><code class="language-js prettyprint">/** @type {{width: number, maxWidth: (number|undefined)}} */
|
<pre><code class="language-js prettyprint">/** @type {{width: number, maxWidth: (number|undefined)}} */
|
||||||
const o = {width: 42};
|
const o = {width: 42};
|
||||||
if (o.maxWidth != null) {
|
if (o.maxWidth != undefined) {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user