javascript function not executing
please, can anyone help check this code snippets linked below?
i have two functions in particular not executing:
https://codepen.io/winniffy/pen/YzOOYdY
3 Replies
In the codepen console:
Line 58 has
But
getH
is not defined anywhere. In addition, you don't pass a string into a setTimeout function, you pass a function reference. So it should read
Not a string so no '
and not a function call, but a function to call, so no ()
.
However, I'mm not sure why you'd assign the return value (which is a timeoutID
to a variable to never use. If your aim is to set a timeout then you call it like any other function
thanks for the help. i found the error, turns out i wasn't calling the functions in other. so i called the functions before the and it worked.