how to check for brackets in string javascript code example Example: javascript function in brackets (function() { // code })();