1

Are built in objects in JavaScript like Math, Array, String etc... just defined in a .js file and then compiled and or interpreted? Can I get a basic high level overview of how they are implemented and made available? I see that in Java there is a String class and that class gets compiled and is available when I need to create an object, is JavaScript similar?

Thank You.

  • 1
    No, they're defined in the engine, and engines aren't written in Javascript, they're written in C, C++, maybe other languages. That's why you see things like `[native code]` – CertainPerformance Jan 02 '20 at 07:13
  • 1
    [How to see the source of Built-in javascript functions?](https://stackoverflow.com/questions/22300206) and https://stackoverflow.com/questions/linked/22300206?sort=votes – adiga Jan 02 '20 at 07:16
  • @CertainPerformance Thanks. I'm assuming built in objects in Java are compiled class files then? Is that correct? Thank you. – Salvatore Allegra Jan 02 '20 at 07:17
  • Sorry, I don't know anything about Java – CertainPerformance Jan 02 '20 at 07:18

0 Answers0