Difference between these two declarations of immediate functions [duplicate]

2

What's the difference between:

(function() {
    console.log('Hello :)');
})();

e:

(function() {
    console.log('Hello :)');
}());

? The two code snippets do the same thing, so I was left wondering if there is any difference other than writing or if they are just different ways of doing the same thing, without performance implications and etc ...

    
asked by anonymous 02.10.2017 / 02:32

1 answer

3

They are just two different ways to perform the immediate execution of a javascript function without any difference of performance between them.

This question about which form would be best to use is answered in the community. Here's the link: Immediate function invocation syntax

    
02.10.2017 / 03:04