68 effective ways to write high-quality JS code (i)Get to know the JavaScript version you're usingTips:
Decide which versions of JavaScript your application supports.
Make sure that the features of any JavaScript you use are supported
PrefaceToday, JavaScript has become the core of Web page editing. Especially in the past few years, the Internet has witnessed the emergence of a large number of JS libraries in the areas of spa development, graphics processing, and interaction.If
Attention:1. In the node environment, the--harmony parameter enables the ES6 new feature, many new features will only take effect under strict mode, so use strict or--use_strict, otherwise harmony is not enabled;1. Block-level scope (block scope)//
First, the Language foundation 1.javascript, only null and undefined are values that cannot have methods, and they do not have wrapped objects. typeof null = = ' object ', typeof undefined = = ' undefined ' 2. In JavaScript operations,
Strictmode description
Android 2.3 offers a debug feature called the Tough Mode (Strictmode), which Google says has benefited hundreds of of Google apps on Android. So what does it do? It will report policy violations related to threads and
The only difference between Const and let is that variables declared with const cannot be re-assigned (read-only variables), such as the following:const FOO = 1// typeerror:assignment to constant variable.
Note: This article does not use
Let's start with the example of a gray egg pain. demo1:
Function Test () {var x = 1; with ({X: 2}) {eval ('function Foo () {console. log (x);} '); EVAL ('var bar = function () {console. log (x);} ');} Foo (); Bar ();} test ();
First, Objective 1, eliminate some unreasonable JavaScript grammar, not rigorous places, reduce some strange behavior; 2, to eliminate the code to run some unsafe, to ensure the security of code operation, 3, improve the efficiency of the compiler,
It is easy to make minor mistakes in 10 JavaScript codes! Today, JavaScript has become the core of web page editing. Especially in the past few years, the Internet has witnessed the emergence of a large number of JS libraries in SPA development,
PrefaceToday, JavaScript has become the core of Web page editing. Especially in the past few years, the Internet has witnessed the emergence of a large number of JS libraries in the areas of spa development, graphics processing, and interaction.If
1. The meaning of this (what is this?) ):
Http://www.ruanyifeng.com/blog/2010/04/using_this_keyword_in_javascript.html
This is a keyword in the JavaScript language.
It represents an internal object that is automatically generated
Today, JavaScript has become the centerpiece of Web page editing. Especially in the past few years, the Internet has witnessed the emergence of a large number of JS libraries in the areas of spa development, graphic processing, and interaction.
If
Incorrect datetime value
How 00:00:00 was inserted into the database in the 0000-00-00, does the application have this requirement?
For the first question, it is still necessary to return to the definition of date time in MySQL, stating in the
Sql_mode may be a variable that is easier for developers and DBAs to ignore, and is empty by default. The Sql_mode setting is actually a more risky setting because it allows for some illegal operations, such as inserting null into a NOT null field,
JavaScript Basics Page (1) properties: async,charset,defer= ' defer ', language obsolete, src,type (2) NULL is a null value, is a special object; Undefined represents a null value, it is not an object is undefined meaning; Undefined==null returns
Beauty would fade but Love would stay.
ECMA-262 describes all the basic concepts of JavaScript through ECMAScript. Before we get to the basics of how JavaScript works, let's review the history of ECMAScript: 1) What does JavaScript have to
In js, the context of this is always unpredictable. In many cases, bugs are always confused. In fact, it is okay to know how to execute it in different situations. Global execution
First, let's look at what this is in the global environment:
First.
If you ask the beginner JS what is more difficult to understand, many answers will be the This keyword. This is different from the different scenes of the object, there is a confusing feeling, Buddha magic is generally mysterious: what is this?
PrefaceToday, JavaScript has become the core of Web page editing. Especially in the past few years, the Internet has witnessed the emergence of a large number of JS libraries in the areas of spa development, graphics processing, and interaction.If
Today, JavaScript has become the core of Web page editing. Especially in the past few years, the Internet has witnessed the emergence of a large number of JS libraries in the areas of spa development, graphics processing, and interaction.If you deal
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.