let myVariable = $(myinputselector).val
When a console.log myVariable it says it's a function, but when I call it with myVariable() it throws a "Uncaught TypeError: this is undefined".
Can't I just get and set the input text like this, it's a limitation of jQuery or am I doing something wrong?
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment