What will be the result of the code?

$('button').on('click', function(){
    this.attr('class', 'clicked');
});
Explanation
There will be a TypeError: this.attr is not a function, because 'this' refers to a DOM element

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести