This is easy to solve, we change the word. But the code will be longer.
The original:
```js
function f(x) {
return typeof x !== 'string' || typeof x === 'undefined';
}
```
The proposal: typeof version
```js
function f(x = typeof(String) && undefined ) { // Attention can not be omitted:
&& undefined
void typeof(Boolean); // or only: typeof(Boolean);
return typeof x !== 'string' || typeof x === 'undefined';
}
```
这很容易解决, 换个单词就行. 但是代码会更长.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss