I'm learning the loops in JavaScript.

Source: Internet
Author: User
Tags html br

for (var num1 =1;num1 <10;num1++) {
for (var num2 =1;num2<10;num2++) {
Console.log (num1+' * ' +num2+' = ' +num1*num2)
}console.log ("<br>")
}

TODO question one: Why would you break a line
TODO during the test I found that in the console every nine times a BR is added
TODO This is in the console if I let him in the body
TODO because in HTML BR is a newline label browser will not be placed in the content but the browser will recognize
TODO, so it's going to change.
TODO question two: Why do you break a line in nine times
TODO because Console.log ("<br>") in the first loop statement
TODO so he'll be in num1 bit 1 o'clock he's going to add a br.

I'm learning the loops in JavaScript.

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.