What do you call functions which get and set?

Posted by nickf on Stack Overflow See other posts from Stack Overflow or by nickf
Published on 2010-04-09T05:39:28Z Indexed on 2010/04/09 5:43 UTC
Read the original article Hit count: 292

The jQuery framework has a lot of functions which will either retrieve or mutate values depending on the parameters passed:

$(this).html();       // get the html
$(this).html('blah'); // set the html

Is there a standard name for functions which behave like this?

© Stack Overflow or respective owner

Related posts about object-oriented-design

Related posts about accessors