Skip to content

Instantly share code, notes, and snippets.

@sheniff
Created April 26, 2015 17:24
Show Gist options
  • Select an option

  • Save sheniff/30411ae336a70c3765cb to your computer and use it in GitHub Desktop.

Select an option

Save sheniff/30411ae336a70c3765cb to your computer and use it in GitHub Desktop.
Just a silly check... making sure a function declaration as "function XXX" keeps internal to the closure
// closure
(function() {
function funcA() {}
var funcB = function() {};
funcC = function() {};
})()
console.log(typeof funcA); // undefined
console.log(typeof funcB); // undefined
console.log(typeof funcC); // function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment