Symbol unknown javascript

Asked

Viewed 47 times

5

Guys, I’m learning javascript and I downloaded Olw Carousel and I went to see the js and at the beginning of the script there’s this excerpt ;(function($, window, document, undefined) what intrigued me was this point and comma at the beginning, I would like to know what it represents at the beginning. Thank you

1 answer

5


That one ; is a safeguard if this script is mixed with others.

If you have for example poorly formatted code that does not end with ; and if you join both codes without breaking line the browser can interpret as the same code and generate errors.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.