I saw this in a plugin:
var options = $.extend(defaults, options);
How does it work?
What does extend() do?
From jQuery Documentation
Merge the contents of two or more objects together into the first object.
In a plugin context: If the user does not set the optional parameters for the function, then a default value will be used instead.