...

View Full Version : force an object



wjrasmussen
11-01-2012, 09:38 PM
I found this piece of code in jquery-1.8.2.js:



// Force options to be an object
options = options || {};


How does this force an object?

WolfShade
11-01-2012, 09:57 PM
It's a conditional statement.

options equals options (if supplied) OR object (if options not supplied).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum