10 ms·
Ask HN: Dozens of transpile mutants for JavaScript and no Elvis Operator. Why?
Why is there no Elvis Operator for object member access?
const a = someObject?mightExist?couldExist?shouldExist?value
- deleted 6y ago[deleted]
- moxylush 6y agoI've been using Elvis or (nullish chaining) in Chrome extensions. I think the syntax is ?. (Question mark period).
- QuestionsForU 6y agoEdge doesn't support this :( You'd think in the 1,454,567 transpile mutants that JavaScript has spawned or the polyfill mess, someone would have implemented this across all browsers.
- trs8080 6y agoEdge does seem to support it: https://caniuse.com/?search=%3F https://caniuse.com/?search=%3F.