[英]Module parse failed: Unexpected token . You may need an additional loader to handle the result of these loaders
What is this syntax message?.length === 1
can anyone explain me how to convert it into normal javascript?这是什么语法
message?.length === 1
谁能解释我如何将它转换成普通的 javascript?
It is a vue js component I downloaded from somewhere but when I put into my project it gets an error这是我从某处下载的 vue js 组件,但是当我放入我的项目时,它会出错
a?.b
is the "optional chaining" operator, which returns undefined when one of the chained properties is undefined or null. a?.b
是“可选链接”运算符,当链接的属性之一为 undefined 或 null 时,它返回 undefined。
message?.length === 1
could be replaced by message && message.length === 1
. message?.length === 1
可以替换为message && message.length === 1
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.