What does the following javascript syntax mean?

I’m currently learning to develop javascript/jquery plugins and I’ve noticed many of them have the following syntax:

var pluginName = window.pluginName || {};

I’m having a hard time understanding what this means, specifically the OR curly braces part. If someone could shed light on what this means in the context of the code then that would be great.


Source: syntax

Leave a Reply