Home > Article > Web Front-end > js null, undefined, string summary_basic knowledge
<br><strong>Summary: </strong> <br>//Another thing to note is that although null It is an Object type but it is very special and is stored in the stack. You can understand it as a special form of Object. <br>//Also, in other object-oriented languages, strings are generally stored in the heap, but in js, they are stored in the stack <br>//After this, a question suddenly occurred to me The difference between declaration and definition, after thinking about it, I feel that it is the same thing, just two ways of saying it. At this time, I suddenly thought that when declaring a variable, <br>//Whether it is on the stack or not, whether it occupies memory (of course all code will exist in code segments, but it uses memory, but that's not what I'm talking about), I mean whether the undefined variable exists on the stack<br>//After thinking about it for a while, I think it does. The reason is that the undefined type has only one value, undefined. When the declared variable is not initialized, of course the default value is the literal value of undefined. . <br>//Let’s talk about null. In fact, it should be stored in the heap, but the js heap ECMAscript was implemented wrong, and now it is accepted by the standard as a placeholder for Object <br>