JavaScript reinforcement tutorial-from simplicity to complexity

Source: Internet
Author: User
Main introduction: JavaScript reinforcement tutorial-javascript from simplified to complex JavaScript reinforcement tutorial-from simple to complex

JS, no compilation required. The interpreter is part of the JavaScript engine-browser. Dynamic type, weak type, prototype based, built-in support type. The component ECMAScript describes the syntax and basic objects of the language. The Document Object Model (DOM) describes the methods and interfaces for processing webpage content. The browser Object Model (BOM) describes the methods and interfaces used to interact with the browser. Programming JavaScript is a scripting language. Its source code does not need to be compiled before it is sent to the client. Instead, it sends the character code in the text format to the browser for explanation. The weakness of the literal translation language is the poor security. In JavaScript, if one cannot run, the following languages cannot run. The solution is to use try {} catch () {}: console. log ("a"); // This is the correct console. log ("B"); // This is the correct console. logg ("c"); // This is incorrect, and the console will be stopped here. log ("d"); // This is the correct console. log ("e"); // This is the correct try {console. log ("a");} catch (e) {}// this is the correct try {console. log ("B");} catch (e) {}// this is the correct try {console. logg ("c");} catch (e) {}// this is incorrect, but it does not stop here, But skips try {console. log ("d");} catch (e) {}// this is the correct try {console. log ("e");} catch (e) {}// this is the correct Javascript language to be classified as a literal translation language, because the current mainstream engines are Load and interpret the Code during the next run. Javascript prototype will always cause some confusion. No matter how experienced experts or the author himself, he often shows limited understanding of this concept, I think this confusion has emerged when we first came into contact with prototypes. They are often related to new and constructor, especially the prototype property of functions ). In fact, prototype is a very simple concept. To better understand it, we should first remember this principle, that is, to forget the knowledge we have learned about construtor prototypes. What is prototype? A prototype is an object that can be used to inherit attributes. Can any object be prototype? Which objects have the original type and all objects have a prototype by default. Because the prototype itself is also an object, each prototype itself has another prototype (only one exception, the default object prototype is at the top of the prototype chain.
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.