JavaScript 中有哪些型別的註釋?


單行註釋

以下內容是 JavaScript 中的單行註釋。在 // 和行尾之間的任何文字都被視為註釋,並且會被 JavaScript 忽略。

// This is a comment. It is similar to comments in C++

多行註釋

以下是 JavaScript 中的多行註釋。

/*
   * This is a multiline comment in JavaScript
   * It is very similar to comments in C Programming
*/

更新日期: 2019 年 9 月 12 日

142 人次瀏覽

啟動你的 職業

透過完成課程獲得認證

開始
廣告
© . All rights reserved.