Selector Performance
ID selectors are fastest, class selectors next. Cache selections in a variable instead of searching again and again.
Example
const $items = $('.item');
$items.addClass('a');
$items.hide();Exercise
Cache name starts with ___.
const items = $('.item')
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.