Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>(name is undefined) </code></pre> <p><strong>You:</strong> What is <code>name</code>?<sup> (*)</sup><br> <strong>JavaScript:</strong> <code>name</code>? What's a <code>name</code>? I don't know what you're talking about. You haven't ever mentioned any <code>name</code> before. Are you seeing some other scripting language on the (client-)side?</p> <pre><code>name = null; </code></pre> <p><strong>You:</strong> What is <code>name</code>?<br> <strong>JavaScript:</strong> I don't know.</p> <p>In short; <code>undefined</code> is where no notion of the thing exists; it has no type, and it's never been referenced before in that scope; <code>null</code> is where the thing is known to exist, but it's not known what the value is.</p> <p>One thing to remember is that <code>null</code> is not, conceptually, the same as <code>false</code> or <code>""</code> or such, even if they equate after type casting, i.e.</p> <pre><code>name = false; </code></pre> <p><strong>You:</strong> What is <code>name</code>?<br> <strong>JavaScript:</strong> Boolean false.</p> <pre><code>name = ''; </code></pre> <p><strong>You:</strong> What is <code>name</code>?<br> <strong>JavaScript:</strong> Empty string</p> <hr> <p><sup>*: <code>name</code> in this context is meant as a variable which has never been defined. It could be be any undefined variable. However, name is a property of just about any HTML form element. It goes way, way back and was instituted well before id. It is useful because ids must be unique but names to not have to be. </sup></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload