avatar
Articles
25
Tags
1
Categories
0
Home
Archives
Huck's dev blog
Search
Home
Archives

Huck's dev blog

Differences between map and weakMap
Created2024-01-14
(1)Mapmap is essentially a set of key-value pairs, but the key in a common Object can only be a string. The Map data structure provided by ES6 is similar to that of an object, but its keys do not limit the range. It can be of any type and is a more complete Hash structure. If the Map key is an original data type, it is considered the same key as long as the two keys are strictly the same. In fact, Map is an array, and each of its data is also an array, with the following format: 1234const...
What happens if you create a new arrow function
Created2024-01-14
The arrow function is introduced in ES6. It does not have a prototype, nor does it have its own this reference, and it cannot use the arguments parameter. Therefore, it is not possible to use the new operator with an arrow function. The steps to implement the new operator are as follows:1.Create a new object Assign the constructor function’s scope to the new object (in other words, set the object’s proto property to point to the constructor function’s prototype property) Point to the...
What are the rules for type coercion of the == operator?
Created2024-01-08
For the == operator,if the types of the two operands being compared are different, the type conversion is performed. If you compare whether x and y are the same, the following judgment process will be performed: First, it will determine whether the two types are the same, and compare the size of the two if they are the same; 2.If the types are not the same, type conversion will be performed; 3.It will first determine whether it is comparing null and undefined, and if it is, it...
The difference between null and undefined
Created2024-01-08
First of all, Undefined and Null are both basic data types. Each of these two basic data types has only one value, which is undefined and null. Undefined means undefined, while null means empty object. When a general variable is declared but not yet defined, it will return undefined. null is mainly used to assign values to variables that may return objects as initialization. Undefined is not a reserved word in JavaScript, which means that it can be used as a variable name, but this...
Data types for Javascript
Created2024-01-08
What data types does JavaScript have and how do they differJavaScript has eight data types: Undefined, Null, Boolean, Number, String, Object, Symbol, and BigInt. Where Symbol and BigInt are new data types in ES6: ● Symbol represents a unique and immutable data type created to resolve possible global variable conflicts. ● BigInt is a numeric type of data that can represent integers in any precision format. BigInt can be used to safely store and manipulate large integers, even if the Number...
123
avatar
huck@love
Articles
25
Tags
1
Categories
0
Follow Me
Announcement
This is my Blog
Recent Posts
enable CORS support in Chrome on Mac2025-05-02
npm install config2025-02-20
Tapbit 合约页面性能报告2025-01-06
Performance Report for Tapbit BTC Contract Page2025-01-03
How large should a JS file be2025-01-02
Tags
CORS, Chrome, macOS, Web Development
Archives
  • May 2025 1
  • February 2025 1
  • January 2025 3
  • November 2024 4
  • March 2024 1
  • February 2024 3
  • January 2024 12
Website Info
Article Count :
25
Unique Visitors :
Page Views :
Last Update :
©2019 - 2025 By huck@love
Framework Hexo|Theme Butterfly
Search
Loading Database