I've completed my code, but when i attempt i'll get a couple come back saying "Cannot read property .length of 'null'". If i click attempt again. i'll get 6 wrong, if i click again 5 were wrong, etc. Problem is, i can't see what the test was so no idea how to correct it.
My code is correct but it decides different tests come back wrong every time i click attempt. Can someone help?
This just saved me. Thanks
You legend, thank you! You helped me realise using string.match returns null if there are 0 matches.
My guess is you're using
match
, read the docs then.You can always use
console.log()
to check the input values.I've completed my code, but when i attempt i'll get a couple come back saying "Cannot read property .length of 'null'". If i click attempt again. i'll get 6 wrong, if i click again 5 were wrong, etc. Problem is, i can't see what the test was so no idea how to correct it.
My code is correct but it decides different tests come back wrong every time i click attempt. Can someone help?