I'm trying to learn JQuery and I got this error. Invalid left-hand side in assignment
I'm trying to point the selector without using any events function.
let a = $("td:contains('"+ word +"')") = function(){
$(this).closest('tr').hide();
$(this).closest('tr').wrap('<hidden>');
state = true;
}
a();
The error likely lies in this part:
$("...")=function(){...}
$("...")
already returns an object, so you can't assign a function()
to it.
From your code, I guess what you want may be this:
let a=(function(){...}).bind($("..."));
a();