Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

does (hash) mean anything as a function parameter in javascript?

var newFieldShow = function(hash) {
  hash.w.fadeIn("2000");
};

I see this in some code I have retrieved from online. I've never seen hash mentioned.. I am trying to determine if it has something to do with hashing, or if it's just an event reference like function(event) which I'm used to seeing, and curious as to why it is being used here.

like image 543
Damon Avatar asked Jun 03 '26 00:06

Damon


1 Answers

If someone sent me this code I would say that hash is an object with a property named w that looks to be a jQuery object (because of the fadeIn method).

hash could mean anything. Thus, the need to properly name variables (and function parameters) that make sense.

like image 98
Kris Krause Avatar answered Jun 05 '26 12:06

Kris Krause



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!