This: When a function is created, a this object is generated, or a this object is generated during function execution.
This point
This indicates the object that calls it directly.
In the callback function of the function, this points to window.
FunctionES6 syntax supports rest parametersThe rest parameter can only be defined at the end of the parameter, using ... Identity. The rest parameter receives an empty array if the passed parameters are not filled with the normal defined
I. Common functions1, this point in the definition of the function is not OK, only the function of the execution of the time to determine who is this point;In fact the end point of this is the object that called it.11)functionA () {2
How to use this kind of writing; the ideal notation is this.setstate ({....})Perhaps I did not describe clearly, I do not want to use this method of learning, so much a variable, I feel very uncomfortable. I tried to assign the setState to a
This is the JavaScript
1. Why use this
Let's take a look at an example:
function identity () {return
this.name.toUpperCase ();
}
function speak () {return
"Hello, I ' m" + identity.call (this);
}
var me = {
name: ' Rod Chen '
}
var =
Actually this is a cliché question. About this article is very many, in fact, I thought I had already understood it, but yesterday in the process of doing the project, or appeared a trace of doubt, think about before the JavaScript weekly in the
This in JavaScript, when it comes to JavaScript, is all about how dexterous and important it is, but doesn't care about it, and it's really important when you get to know the JavaScript step-by-step. So, I spent about 2 weeks to check and read the
This is mainly about the type judgment function of JavaScript typeof and judging the use and attention of the prototype instanceof of the constructor.
typeof
Let's talk about typeof first. The first thing to note is that the TypeOf method returns
Objective
This article is about the use of the input box component TextInput and button buttons, combining the previous Flexbox layout to build a simple login interface.
No more nonsense, first on the effect of the picture.Input Box Component
Sample Code for JavaScript Implementation of the image carousel component this article introduces the JavaScript Implementation of the image carousel component. If you don't talk much about it, simply look at the following:
Effect:
Requirements
ES6ECMAScript is a script programming language that is standardized by the ECMA International (formerly the European Association of Computer manufacturers, the English name is European Computer Manufacturers Association) through ECMA-262.This
The shorthand for JavaScript developers
This article is based on years of JavaScript coding experience and is suitable for all developers who are using JavaScript programming.
The purpose of this article is to help you more skillfully use the
The following is a one-week summary of small program development, hoping to help students of php. In the editor, I directly use vscode (similar to other editors, preview or use development tools). syntax highlighting sets wxml to html and wxss to
1. Variable/Assignment
var can be defined repeatedly, cannot limit modifications, and does not have block-level scopes
Let cannot repeat definitions, variables, block-level scopes
Const cannot be defined repeatedly, constants, block-
Airbnb's code specification is a very popular set of specifications in the industry, and it has been evolving to introduce the latest technology specificationsOriginal: https://zhuanlan.zhihu.com/p/20616464Write react and JSX in a more reasonable
This is a concept in object-oriented programming, which generally points to the object where the current method call resides, which is very clear in the more restrictive object-oriented programming languages such as Java and C + +. But in JavaScript,
Summary of key VUE issues and summary of VUE issues
1. Three Mount methods for components
Automatic mounting
var app3 = new Vue({ el: '#app-3', data: { seen: true }})
Manual mounting
// Delayed on-demand mounting {{ name }} Mount var obj = {name:
1 Selection Questions1.1 By default, what is the effect of using the P mark ()A. Add 8 spaces to the position of the text pThe text behind the B.P becomes boldC. Start a new lineThe text behind the d.p becomes italic.Answer: CWhat is the role of the
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.