es6 Null conduction operator - es6 Null conduction operator
某草草
某草草 2017-05-19 10:30:39
0
2
1637

How to use the Null conduction operator in Ruan Yifeng es6.

const firstName = message?.body?.user?.firstName || 'default';

写了这句之后直接编译出错了。

某草草
某草草

reply all(2)
小葫芦

This syntax is js 的么?感觉是 coffee 的,即使 js 有,应该也得有引入对应的presetsbabeles6好像没有这种语法,引入最新的babel presetTry to see if it can be compiled

PHPzhong

Mentioned in the article. "Null Conduction Talisman" is just a proposal. Babel is not displayed yet.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template