JavaScript (Day2)

18 阅读1分钟

注释与规范

分类

  1. 单行注释 快捷键:Ctrl+/

    // alert('hello world')
    
  2. 多行注释 快捷键:Ctrl+Shift+/

            /* alert('hello world')
            alert('hello world')
            alert('hello world')
            alert('hello world') */
    

规范

  1. 句末分号 :可加可不加,建议不加
  2. 合理使用Tab键