JQuery UI: two semicolons after a boolean expression using a function wrapper

I looked at some jQuery UI code, found a strange behavior there:

jQuery.ui||(function(a){ /*... */ })(jQuery);;

The logical OR is clear to me, the shell of the function (still looking for the correct name for it), but why two semicolons?

Thanks in advance

Vincent

EDIT: Just found another weird thing: in google apis version only one semicolon is used. But when you create your built-in function http://jqueryui.com/download , there are two semicolons.

+3
source share
3 answers

Destruction:

// make sure that any previous statements are properly closed
// this is handy when concatenating files, for example
; 
// Call the jQuery.ui object, or, if it does not exist, create it
jQuery.ui || (function($) { 

link

+1
source

? - .

0

This should be a mistake or misunderstanding. Two consecutive semicolons do not make sense.

0
source

Source: https://habr.com/ru/post/1742877/


All Articles