一、特殊符号

1、可选链.?

2、空值合并运算符??

3、空值赋值运算符??=

4、逻辑运算符&&、&、||、|

特别注意:跟大部分语言中逻辑运算有区别,如果你才接触js,之前主要用C++、JAVA、Python等语言,你会有诸多疑惑。比如:0 || {name: 'zhangsan'} // 结果为:{name: 'zhangsan'},你会感觉很奇怪

5、浮点数取整~~、变量转换为 bollean 类型!!

6、展开语法...、解构const {a, b} = obj、剩余参数(a, b, ...rest)

一些常用常规好理解的(比如!、三元运算符等等)就不一一列举了

二、实用例子

1、判断对象参数是否为null或undefined,如果为空,赋默认值
实用场景:函数或参数,需要判断是否为空,为空赋默认值

const defaultValue = 'test';
const a = {
	b: {
		c: undefined	
	}
}
function test(a) {
	const c = a?.b?.c || defaultValue ;
	console.log(c); 
}
test(a); // 打印:test