A cleaner way to convert a function declaration into a function expression would be to use brackets
(function() {
//code here
})();
This won't affect the return type of the statement; which in case of using ! will return boolean 'true' unless the function returns a truthy value. Plus using ! for this purpose, looks totally messy.