Preface:
Detailed introduction:
practise://String let str = "hello js"; console.log(str.toString); //Print: hello js console.log(str.length); //Print: 8 console.log(str.substr(1,3));//Method: Split and print the string:ell console.log(str.split(' ')); //Method: print by grouping according to specified parameters ['hello' 'js'] //Number let num = 123; console.log(!isNaN(num)); //Judge whether it is NaN, if not, it means it is a value //Boolean let flag = false; if(flag) { //The print result is false console.log("The result is true"); }else{ console.log("The result is false"); } //Undefined let d; let val = `When an object is unassigned, its current value is: ${d}`; console.log(val); //Print: When an object is unassigned, the current value is: undefined //Null let a = null let nul = a; console.log(nul); //Print: null //Object let obj1 = { "name":"Zhang San", "age":24 } //Symbol let sy = Symbol("1"); if(sy == Symbol("1")) { //Print: the result is false console.log("the result is true"); }else{ console.log("The result is false"); } SummarizeThis article ends here. I hope it can be helpful to you. I also hope you can pay more attention to more content on 123WORDPRESS.COM! You may also be interested in:
|
<<: Introduction to SSL certificate installation and deployment steps under Nginx
>>: An article to help you learn CSS3 picture borders
The bash history command in Linux system helps to...
Achieve resultsImplementation Code html <div&g...
There are two ways to configure multiple projects...
introduction It is okay to add or not add a semic...
A brief analysis of rem First of all, rem is a CS...
Loading rules of require method Prioritize loadin...
MySQL versions are divided into Enterprise Editio...
1. What is the use of slow query? It can record a...
Preface This article mainly introduces the releva...
This article mainly introduces the binary type op...
Table of contents introduction 1. Code to start t...
environment Centos 6.6 MySQL 5.7 Install If the s...
Introduction to Linux alarm function Above code: ...
Table of contents Preface Background Implementati...
How to reset the initial value of the auto-increm...