Home > Web Front-end > Front-end Q&A > Is javascript interpreted or compiled?

Is javascript interpreted or compiled?

青灯夜游
Release: 2021-11-26 17:55:44
Original
4097 people have browsed it

Javascript is interpreted. JavaScript is a lightweight, interpreted or just-in-time compiled scripting language with function priority; code written in JavaScript does not need to be compiled and can be run directly. The browser will directly interpret the source code and create variables in memory. Wait for operations.

Is javascript interpreted or compiled?

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

What is interpretive type? What is compiled type?

Compiled language is to first compile the source code into machine code (that is, the so-called executable program, such as the exe file of the Windows system). When running The computer only needs to directly hand over the machine code to the CPU for execution. Compiled languages ​​are characterized by fast running speed and high efficiency. The disadvantage is poor portability.

Analytical language appears directly in the form of source code, and is parsed into machine code in real time during operation and executed. All scripting languages ​​(including JavaScript of course) are interpreted languages. The biggest feature of this type of language is that they cannot exist independently and must be parasitic in other programs (such as browsers).

Is javascript interpreted or compiled?

javascript is interpreted.

Javascript is a lightweight, interpreted or just-in-time compiled scripting language with function priority. Unlike C, C and other languages ​​that need to be compiled first and then run, code written in JavaScript does not need to be compiled. Can be run directly.

Also because JavaScript is an interpreted language, this means that the system only knows whether each code is wrong when it is run.

[Recommended learning: javascript advanced tutorial]

The above is the detailed content of Is javascript interpreted or compiled?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template