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
Table of contents 1. Software and system image 2....
mysqldump command Introduction: A database backup...
Table of contents 1. The role of watch in vue is ...
This article will introduce how to use Docker to ...
Calculation of the box model <br />Margin + ...
iOS 1. URL scheme This solution is basically for ...
This method uses the drop-shadow filter in CSS3 t...
Table of contents 1. Registering custom instructi...
First way: skip-grant-tables: Very useful mysql s...
1. Use data from table A to update the content of...
UCenter Home is an SNS website building system rel...
MySQL 8.0.18 stable version (GA) was officially r...
Two problems that are easy to encounter when inst...
This article shares the specific code for Vue to ...
Vue uses Ref to get component instances across le...