JS Basics _ Basic Syntax

Source: Internet
Author: User

1 <!DOCTYPE HTML>2 <HTML>3     <Head>4         <MetaCharSet= "UTF-8">5         <title></title>6         <Scripttype= "Text/javascript">7             8             /*9 Multi-line commentsTen JS Comment One multiple lines of comment, the content in the comment is not executed, but can be viewed in the source code A to develop a good habit of writing annotations, you can also use annotations to do some simple debugging of your code. -              */ -              the             //single-line comment -             //alert ("Hello"); -             //document.write ("Hello"); - Console.log ("Hello"); //This statement is used to output a log in the console +              -             /* + * Strict case sensitivity in 1.JS A * Each statement in 2.JS ends with a semicolon (;) at *-If you do not write a semicolon, the browser will automatically add, but will consume some system resources, and sometimes, the browser will add the wrong semicolon, so in the development of the semicolon must write - * Multiple spaces and line breaks are ignored in 3.JS, so we can format the code with spaces and line breaks -              *  -              */ -              - Alert ("Hello"); in                              -                              to              +         </Script> -     </Head> the     <Body> *          $     </Body>Panax Notoginseng </HTML>

JS Basics _ Basic Syntax

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.