0

I've not found any question about that already...

I'm doing a game in javascript, and I know there is no other best way to protect the code than executing it server-side...however :

i would like to know what wrapping the whole JS code into anonymous function can bring security wise ?

And what is the best practice/way for using it ?

TOPKAT
  • 6,667
  • 2
  • 44
  • 72
  • 3
    http://stackoverflow.com/questions/2421911/what-is-the-purpose-of-wrapping-whole-javascript-files-in-anonymous-functions-li – Daniel A. White Jan 11 '16 at 15:25
  • FWIW, I'd avoid using completely anonymous functions if the function does more than anything very trivial - give everything a name, they'll show up in stacktraces and help with debugging etc. – James Thorpe Jan 11 '16 at 15:27

0 Answers0