Understanding the Role of Semicolons in Javascript


Semicolons mark the end of statements, but are often optional due to automatic semicolon insertion (ASI).

Source Code

let name = "John"
let age = 30
console.log(name); // Works due to ASI
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments