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
Зарегистрируйся сейчас
или Подпишись на будущие тесты