Calling A Javascript Function Without Arguments
Is it possible to call a javascript function without paranthesis? (). In the below code, from a book, has the line, http.onreadystatechange = useHttpResponse; If there is no para
Solution 1:
When assigning an event handler, you don't want to call the function, you're giving it a reference to a function, which will be called later.
So... no. ()
is used to mean "call this function", in this case with no arguments.
Post a Comment for "Calling A Javascript Function Without Arguments"