+ 2
Can we assign "Undefined" as a value to a variable?? Is it a good practice??
4 Respostas
+ 5
Hmm... i think you should use "Not Found" instead of undefined, because undefined is equals to error
+ 3
+ 2
If you are talking about JavaScript then I think it is not a bad practice.
But what you wanna do after assigning undefined to a variable. During declaration of a variable, the default value is undefined.
+ 1
But "Not found" is a string value that the coder has to explicitly assign it to the variable. And "undefined" is a predefined value, these are two different things, you know.