void方法让返回值为undefined
var a = b = c = 3; //定义并初始化变量的值
d = void (a -= (b *= (c += 5))); //执行void运算符,并把返回值赋予变量d
console.log(a); //返回-21
console.log(b); //返回24
console.log(c); //返回8
console.log(d);//返回undefined
//void()的优先级高于括号(),同时里面的计算不中断
常用viod()来初始化值为undefined,用来给a标签禁掉跳转
标签:返回,console,log,void,返回值,方法,undefined From: https://www.cnblogs.com/Sultan-ST/p/16833047.html