Coding a Hank Hill HotkeyToday we'll be coding a hotkey easter-egg for your website that will display a random Hank Hill image in your viewport. This will prove to be an essential feature that will delight your visitors, optimize the user experience, and improve your convers...Feb 14, 2022 路 2 min readblog.jsbits-yo.com
HTML <dialog>HTML's <dialog> element is a built-in tag to represent a dialog box or modal. It's not just a newer semantic element, it also includes an API and its own special CSS. Here's a video using <dialog> in action: How to use it To start, we add our <d...Nov 18, 2021 路 2 min readblog.jsbits-yo.com
Easy console.log() inside one liner functionsLet's say we want to log obj inside this .map() function here: const arr = [ { val: 1 }, { val: 2 }, { val: 3 } ]; const nums = arr.map(obj => obj.val*2); Well, dang! Now we have to convert this to a multi-line function, right? const nums = a...Nov 10, 2021 路 1 min readblog.jsbits-yo.com
What JavaScript looked like in 1996Check out this very early JavaScript guide book I got from eBay. It was released in 1996 and is only the beta edition back when JS was just born! 馃懚 Definitely a piece of history. See the short video here. Yo! I post byte-sized tips like these often...Nov 4, 2021 路 1 min readblog.jsbits-yo.com
Creating a Text-To-Speech program in Vanilla JSIf you haven't been too traumatized from using a Microsoft browser, you might have discovered Edge's built-in "Read Aloud" feature which will speak the highlighted text out loud right in your browser: As of now, Chrome has no such feature so we're g...Oct 29, 2021 路 2 min readblog.jsbits-yo.com