0

All of the programming languages that I have ever learned run either on A: An interpreter (like Python) or B: A compiler (like C). Just recently however, I came across an article that said Javascript was run using a "translator". I have never seen this term used before; is there such a thing as a "translator" or did the writer of the article simply not know that the proper term is "interpreter"?

UPDATE: I am not sure why this question was closed, as I am already aware of the differences between an interpreter and a compiler. My question is whether or not there is such a thing as a "translator" for Javascript.

Here is the original webpage: https://www.javatpoint.com/javascript-tutorial

The confusing part for me is the third paragraph: "Javascript is not a compiled language, but it is a translated language."

JerryWill321
  • 133
  • 5
  • 1
    "Translator" sounds like a weird translation of "compiler". – Bergi Jan 05 '22 at 18:06
  • 1
    This also sounds like something to ask the author of the article to clarify in their article (if it's a blog post or some other publication where you can contact the author, or leave a comment for them). – Mike 'Pomax' Kamermans Jan 05 '22 at 18:06
  • https://stackoverflow.com/questions/65697629/javascript-is-compiled-or-interpreted-language-or-both – epascarello Jan 05 '22 at 18:06
  • 1
    Many modern interpreters compile to some intermediate language before interpreting and/or compile to native code at runtime for hotspots. – tkausl Jan 05 '22 at 18:07
  • Rephrasing title to be about "translater". Please provide a link or reference to the article mentioned. – Codebling Jan 05 '22 at 18:21
  • We can not guess at what the blog author was saying.... probably used the wrong term. – epascarello Jan 05 '22 at 18:26
  • Have you seen https://en.wikipedia.org/wiki/Translator_(computing)? (I do however disagree with it considering an interpreter as a translator - while an interpreter may or may not do translation, fundamentally it is an *executor*.) – Bergi Jan 05 '22 at 18:28
  • "*The JavaScript Translator (embedded in the browser) is responsible for translating the JavaScript code for the web browser.*" - that's just bullsh**. Correct would be "The JavaScript interpreter (embedded in the browser) is responsible for executing the JavaScript code in the web page". – Bergi Jan 05 '22 at 18:30
  • I see your point. – JerryWill321 Jan 05 '22 at 18:31
  • Want to learn JavaScript? Start with the [official JavaScript documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript). It is the best JavaScript documentation and the source of truth. – axiac Jan 05 '22 at 19:03
  • @axiac "*the source of truth*" - not any longer. It's a wiki, written not only by experts. – Bergi Jan 05 '22 at 20:19

0 Answers0