javascript - What is the difference between putting a function in parentheses and not putting it in parentheses?
伊谢尔伦
伊谢尔伦 2017-05-19 10:46:05
0
1
431

The code in js is as follows:

function ff(a,b){...};
(0,ff)(_a,_b); // ~>1
ff(_a,_b); // ~>2

What is the difference between 1 and 2?
//You can Baidu comma operator!

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
阿神

comma operator

var x = 0;
var y = 1;
var z = (x, y); // 1
var w = y; // 2

It’s the same as your example

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