Home > Web Front-end > JS Tutorial > body text

Summary of related courses for the advanced series

伊谢尔伦
Release: 2017-06-15 11:37:23
Original
1420 people have browsed it

Function declaration Function assignment expression Assignment expression of named function Functions are first-class objects in JavaScript, which means that functions can be passed like other values. A common usage is to pass an anonymous function as a callback function into an asynchronous function. The method above the function declaration function foo() {} will be parsed (hoisted) before execution, so it exists anywhere in the current context, even if it is called above the function definition body. foo(); // Runs normally because foo has been created before the code runs function foo() {Function assignment expression var foo = function() {}; This example assigns an anonymous function to variable foo. foo; // 'undefined' foo(); // Error

1. JavaScript Advanced Series - Function Declaration and Expression

Summary of related courses for the advanced series

Introduction: Functions are first-class objects in JavaScript, which means they can be passed around like other values. A common usage is to pass an anonymous function as a callback function into an asynchronous function.

2. JavaScript Advanced Series—Equality and Comparison in Types

Summary of related courses for the advanced series

Introduction: The equal operator consists of two equal signs: == JavaScript is a weakly typed language, which means that the equal operator will perform a cast in order to compare two values.

3. JavaScript Advanced Series—How this works

Summary of related courses for the advanced series

##Introduction: JavaScript has a completely different mechanism for processing this than other languages. In five different cases, this points to something different.

4. JavaScript Advanced Series - Closures and References

Summary of related courses for the advanced series

##Introduction: Closure is a very important feature of JavaScript, which means that the current scope can always access variables in the outer scope. Because functions are the only structures in JavaScript that have their own scope, the creation of closures relies on functions.

5.

JavaScript Advanced Series—arguments Object

Summary of related courses for the advanced series

Introduction: Every function in JavaScript can access a special variable arguments. This variable maintains the list of all parameters passed to this function.

6.

JavaScript Advanced Series—Why not use eval

Summary of related courses for the advanced series##Introduction: The eval function executes a JavaScript code string in the current scope.

7.

JavaScript Advanced Series—Scope and Namespace

Summary of related courses for the advanced series##Introduction: Although JavaScript supports code segments created by a pair of curly braces, it does not support block-level scope; it only supports function scope.

8. JavaScript Advanced Series - for in loop

##

Introduction: Like the in operator, the for in loop also traverses all properties on the prototype chain when looking for object properties.

9. JavaScript Advanced Series—Object Usage and Properties

Summary of related courses for the advanced series

##Introduction: A common misunderstanding is that numerical literals cannot be used as objects. This is due to a bug in the JavaScript parser, which attempts to parse dot operators as part of a floating-point literal value.

10. JavaScript Advanced Series—Prototype

Summary of related courses for the advanced series

##Introduction: Often mentioned as a shortcoming of JavaScript, the prototype-based inheritance model is actually more powerful than traditional class inheritance. Implementing the traditional class inheritance model is easy, but implementing prototypal inheritance in JavaScript is much more difficult. (It is for example fairly trivial to build a classic model on top of it, while the other way around is a far more difficult task.)

The above is the detailed content of Summary of related courses for the advanced series. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!