Skip to main content
Engineering LibreTexts

5.10: Exercises

  • Page ID
    29152
    1. Explain why it is a very bad idea to serialize functions in JSON and store them to an external file or send them to another computer.
    2. What is the eval() function in JavaScript? What do you think is the original of the JavaScript saying “eval is evil”.
    3. Explain why an object built with encapsulation but the ability to change the methods accessing the closure variable is safe.
    4. What is the difference between using the new operator and operator.create?