Chapter 9. Ninja alchemy: runtime code evaluation

This chapter covers

  • How runtime code evaluation works
  • Different techniques for evaluating code
  • Using evaluation in applications
  • Decompiling functions
  • Namespacing
  • Compressing and obfuscating

One of the many powerful abilities that distinguish JavaScript from many other languages is its ability to dynamically interpret and execute pieces of code at runtime. Code evaluation is simultaneously a powerful, as well as a frequently misused, feature of JavaScript. Understanding the situations in which it can and should be used, along with the best techniques for using it, can give us a marked advantage when creating advanced application code.

In this chapter, we’ll explore the various ways of ...

Get Secrets of the JavaScript Ninja now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.