Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not 100% sure about what that code is supposed to do, but I can point out a few of things:</p> <ol> <li>I'm not sure how you would call that function with <code>e</code>, but without <code>s</code> . . . parameters are determined by their placement in the function definition, so, in this case, since it is defined as <code>function Validation(s, e)</code>, if you put only one parameter in, the function will consider it to be <code>s</code>. Technically, you could call the function like this: <code>Validation(undefined, e)</code>, but even then you are still sort of "defining" <code>s</code> as <code>undefined</code>.</li> <li><em>IF</em> you are saying that it doesn't work when you supply <code>s</code>, but not <code>e</code>, that is because leaving out <code>e</code> when you call the function, will make the value undefined. As soon as you try <code>e.value</code>, JS will throw the error "TypeError: e is undefined".</li> <li><code>s</code> does not appear to be used in the function, so there is nothing that can be known about it, other than it is a parameter of the function, but you can deduce from looking at the function that <code>e</code> is an object with, at least to properties: <code>value</code> and <code>isValid</code>. Additionally you can surmise that <code>isValid</code> is intended to store a Boolean value, given that it is assigned values of <code>false</code> in the code, but, since the sole use of <code>value</code> is as the parameter of a <code>String</code> constructor (which can accept a TON of different value types as a parameter), there's no real way of knowing what type of data it is intended to hold.</li> </ol> <p>That's all that I can think to offer at the moment.</p>
    singulars
    1. This table or related slice is empty.
    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. This table or related slice is empty.
    1. This table or related slice is empty.
    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