Javascript _ chrome and Internet Explorer

Source: Internet
Author: User

Chrome has faster JavaScript;

Write the following smallProgram:

 

<HTML>

<Script language = "JavaScript">

 

VaR sum = 0;

VaR start = new date;

For (VAR I = 0; I <1000001; I ++ ){

Sum + = I;

}

VaR stop = new date;

Document. Write ("cumulative result from 1 to 1000000:" + sum + ";" + "<br/>" + "<br/> ");

Document. Write ("Time consumed" + (stop. gettime ()-start. gettime () + "millisecond ");

 

</SCRIPT>

</Html>

 

 

Run the following commands in chrome and IE 8.0 respectively:

The following is ie 8.0, and the result is a bit miserable ..

 

 

 

 

 

 

 

Solve the following problems...

Write as follows:Code:

 

 

<HTML>

<Script language = "JavaScript">

VaR name = 10001;

Name = Name + 8;

Document. Write ("note the differences between the two! "+ Name +" 666 ");

</SCRIPT>

</Html>

 

 

Run the following commands in chrome and IE 8.0 respectively:

 

Run addition in IE, and add 8 to the string in chrome;

 

Related Article

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.