Hacker News new | ask | show | jobs
by almd 599 days ago
true it is tedious but I have a vs code shortcut for doing the following (and same goes for queryselectorall) let foo = document.queryselector(‘.foo’);

if (!!foo) { //do thing }