js的注释和结束符

注释:

1.单行注释

2.多行注释

结束符

   1. 符号 分号 ;

   2. 可写也可不写。 可以统一约定。

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //1.js的注释
        //单行注释 ctrl+/
        /*多行注释 ctrl+shift+
    
        
        */
        //2.js的结尾符号
        //js的结尾符号;可以省略。 需要约定统一
        alert('hello world1');
        alert('hello world2');


    </script>
</body>

</html>