The inventor

Brendan Edge was born in 1961 in Sunnyvale, California and graduated from the University of Illinois at Urbana-Champaign. While working for Netscape in 1995, he developed JavaScript for the Netscape browser, which has since become one of the most widely used scripting languages in browsers. Brandon helped found Mozilla in 1998 and the Mozilla Foundation in 2003 after AOL decided to end development of its Netscape browser.


JavaScript introduction

JavaScript (” JS “for short) is a function-first, lightweight, interpreted or just-in-time compiled programming language. Although it is best known as a scripting language for developing Web pages, iT is also used in many non-browser environments. JavaScript is a prototype-based, multi-paradigm dynamic scripting language, and supports object-oriented, imperative, and declarative (such as functional) programming styles.

The standard for JavaScript is ECMAScript. As of 2012, all browsers fully support ECMAScript 5.1, with older browsers supporting at least the ECMAScript 3 standard. On 17 June 2015, ECMA International released the sixth edition of ECMAScript, officially known as ECMAScript 2015, but commonly referred to as ECMAScript 6 or ES2015.

Javascript was designed in ten days. Moreover, the designer is to deliver to the company, I do not want to design so.

The language, on the other hand, was designed to handle simple web interactions (such as checking “username”) without considering the needs of complex applications. Designers never dreamed that Javascript would be able to create web pages as large and complex as Gmail.


JavaScript, designed in just ten days, certainly faces many drawbacks

  1. Not suitable for large programs: Javascript has no namespace and is difficult to modularize; There is no specification for how to distribute code across multiple files; Allows for duplicate definitions of functions with the same name, with the latter overwriting the previous, making modular loading difficult.

  2. A very small standard library: Javascript provides a very small standard library of functions that do only a few basic things and do not have many features.

  3. Null, and undefined

  4. Global variables are difficult to control: Javascript global variables are visible in all modules; Global variables can be generated inside any function, which greatly increases the complexity of the program.

  5. Automatic insertion of semicolons: All Javascript statements must end with a semicolon. However, if you forget to add a semicolon, the interpreter does not report an error, but automatically adds a semicolon for you. Sometimes, this leads to errors that are hard to spot.

  6. The plus operator.

  7. NaN

  8. The distinction between arrays and objects: Since Javascript arrays are objects, it can be tricky to tell whether an object is an array or not

  9. == and === : == are used to determine whether two values are equal. When two value types are different, an automatic conversion occurs, and the result is very counterintuitive.

  10. Wrapper objects of primitive types: Javascript has three basic data types: strings, numbers, and Booleans.


Note the main features by looking at the defects

  1. Embed dynamic text in HTML pages.
  2. 2. Respond to browser events.
  3. Read and write HTML elements.
  4. Validate data before it is submitted to the server.
  5. Detect the visitor’s browser information. Control cookies, including creation and modification.
  6. Server-side programming based on Node.js technology.

Composition of language

  • ECMAScript, which describes the syntax and basic objects of the language.
  • Document Object Model (DOM), which describes methods and interfaces for handling web page content.
  • The Browser Object Model (BOM), which describes the methods and interfaces for interacting with the browser.

The operation mode

JavaScript is a kind of high-level scripting language belonging to the network. It has been widely used in the development of Web applications. It is often used to add various dynamic functions to Web pages and provide users with smoother and more beautiful browsing effects. JavaScript scripts are often embedded in HTML to achieve their own functionality.

  • Is an interpreted scripting language (code is not precompiled).
  • It is used to add interactive behavior to HTML (standard Common Markup Language) pages.
  • You can embed it directly into an HTML page, but writing it as a separate JS file helps separate structure from behavior.
  • The cross-platform feature, supported by most browsers, can run on a variety of platforms (such as Windows, Linux, Mac, Android, iOS, etc.).
  • JavaScript scripting languages, like other languages, have their own basic data types, expressions and arithmetic operators, and basic programming frameworks for programs.
  • JavaScript provides four basic data types and two special data types for processing data and text. While variables provide a place to store information, expressions can accomplish more complex information processing.

Language standard

JavaScript has been submitted to ECMA as a standard by Netscape, called ECMAScript, with the standard number ECMA-262. The latest version is ECMAScript 6.


conclusion

In this way, JavaScript has many drawbacks, but most of them can be avoided with good programming practices and the help of third-party libraries. And on the contrary, it’s very powerful. The future is very bright.


Today’s JavaScript record is my daily learning record, please correct any mistakes, temporarily recorded here, you can also learn according to the following websites,Baidu learns dafa

JavaScript is born to learn. See you later.