I was trying to check if an input field with the type of number is empty, and I already found how to do it but I can't understand why
I found an answer which taught me how to do it, but not why, and I really want to understand how it works in the background
I know that if I use the length method it won't work since it is used to look for a string, but if I leave it empty and click on the button, what will be sent, a null
value, an undefined
or anything else?
here is the code I used to check:
if (!value) {
//do work here
}