How to use the Null conduction operator in Ruan Yifeng es6.
const firstName = message?.body?.user?.firstName || 'default'; 写了这句之后直接编译出错了。
This syntax is js 的么?感觉是 coffee 的,即使 js 有,应该也得有引入对应的presets 到babel,es6好像没有这种语法,引入最新的babel presetTry to see if it can be compiled
js
coffee
presets
babel
es6
babel preset
Mentioned in the article. "Null Conduction Talisman" is just a proposal. Babel is not displayed yet.
This syntax is
js
的么?感觉是coffee
的,即使js
有,应该也得有引入对应的presets
到babel
,es6
好像没有这种语法,引入最新的babel preset
Try to see if it can be compiledMentioned in the article. "Null Conduction Talisman" is just a proposal. Babel is not displayed yet.