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
Recorded the installation tutorial of mysql 5.7.1...
Today, when I was on the road, a colleague sent m...
Linux often encounters situations such as adding ...
After installing VMware and creating a new virtua...
1. Single machine environment construction# 1.1 D...
Introduction Use simple jQuery+CSS to create a cus...
I believe that everyone needs to reinstall MySQL ...
I believe that students who have learned about th...
Table of contents Preface 1. ss command 2. Overal...
Sublime Sublime Text is a code editor (Sublime Te...
Copy code The code is as follows: .sugLayerDiv{ p...
Table of contents Install: 1. Basic use of firewa...
This time we use HTML+CSS layout to make a prelim...
The automatic scrolling effect of the page can be...
I have been playing around with charts for a whil...