What is the difference between these 2 JavaScript declarations?

后端 未结 5 1359
执念已碎
执念已碎 2021-01-02 05:10

For one of them the \"()\" is inside, for the other one it is outside. Here they are:

var a = (function() {
    return {
        bla: function(         


        
5条回答
  •  走了就别回头了
    2021-01-02 05:40

    I think is the same difference of this:

    var myObj = {bla:'blabla'}; 
    var a = (myObj);
    var b = myObj;
    

    ...no difference :)

提交回复
热议问题