+ 2
Why do the '.lenght' doesn't work ?
https://code.sololearn.com/WjnV1qnET52c/?ref=app I did that but when i click on the submit button it displays 'undefined'
2 Answers
+ 4
FIRST ERROR:
it is "length" not "lenght"
SECOND ERROR:
when you want to compare with ' ' you should use === not ==
like that: if($('#username').val() === '') {
BTW it is nice code :D
+ 2
Is written "length".