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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.