Answers for "Create your own query selector shorthand"

0

Create your own query selector shorthand

const $ = document.querySelector.bind(document);
const $$ = document.querySelectorAll.bind(document);

const mainContent = $('.main-content');
const externalLinks = $$('a[target="_blank"]');
Posted by: Guest on May-18-2021

Code answers related to "Create your own query selector shorthand"

Code answers related to "Javascript"

Browse Popular Code Answers by Language