Single Line comment
ต่อไปนี้คือ single line comment ใน JavaScript ข้อความระหว่าง // และท้ายบรรทัด จะถูกจัดว่าเป็นคอมเมนต์และถูก JavaScript ไม่สนใจ
// This is a comment. It is similar to comments in C++
Multi-Line comment
ต่อไปนี้คือ multi-line comment ใน JavaScript
/*
* This is a multiline comment in JavaScript
* It is very similar to comments in C Programming
*/