7 ms·
How would you re-write: var isString = typeof string === "string" ? true : false; ?? Just curious, as I can't tell what's wrong here...
by magic_beans 11y ago
How would you re-write: var isString = typeof string === "string" ? true : false;
??
Just curious, as I can't tell what's wrong here...
- Rockslide 11y agoNothing is technically wrong. But I would write it as var isString = typeof string === "string";
- stevenspasbo 11y agoAs rockslide said, it's not incorrect, it's just overly verbose.