Programming Tips - jQuery: remove some class and add some class in one statement

Date: 2017apr21 Language: javaScript Library: jQuery Q. jQuery: remove some class and add some class in one statement A.
$('#mything').removeClass('oldclass').addClass('newclass');
There is also toggleClass() that removes a class if its there and adds it if not there.