Is Javascript compiled or an interpreted language? [closed]

不打扰是莪最后的温柔 提交于 2019-12-29 02:24:09

问题


Can Javascript be called a pure interpreted language? Or does it also have some compiled flavor to it? Could someone guide at the reasons behind both the things whichever being true.


回答1:


Go and read the answers to this question

https://softwareengineering.stackexchange.com/questions/138521/is-javascript-interpreted-by-design

The answer I accepted is excellent and should help answer your question.

For me personally, I am somewhat cautious of the idea of calling a language interpreted or compiled. It's an implementation decision, not part of the language specification. If you want to talk about compiled or interpreted JavaScript, ask it in the context of an actual implementation of the language specification.




回答2:


JavaScript is interpreted at runtime by the client browser. There is a tool called the Rhino JavaScript Compiler that supposedly compiles JavaScript into Java class files, though.



来源:https://stackoverflow.com/questions/9623813/is-javascript-compiled-or-an-interpreted-language

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!