🔰JS is compiled

JavaScript is a compiled language

JSconceptscompiler ⟩ JS is compiled

JavaScript code is compiled first, and then execute.

SyntaxError: unexpected token "xxx"

var greeting = "Hello";
console.log(greeting);   // ⭐️ this line doesn't have a chance to run❗ 

greeting = ."Hi";        // ⭐️ error occurred in the "tokenizing" stage
//         ↑             //    of compilation❗
//         ↑
// ⛔ SyntaxError: unexpected token .

Last updated