please explain this construction.....
Code:localStorage = (function () { return { setItem: function (key, value) { createCookie(key, value, 3000) }, // setItem getItem: function (key) { return(readCookie(key)); } // getItem }; // return } // function closed here ) // why is this fn inside parens? (); // what is this for?
why is the function after "localStorage =" enclosed in parens?
and what is the " (); " at the end for?
thank you...



Reply With Quote



)

Bookmarks