Blog posts filed under “JavaScript”
- How to use event delegation with jQuery
- How I built a password toggle script in vanilla JavaScript
- Declare multiple JavaScript variables in one statement
- Building a word and character count app in vanilla JavaScript
- Named callback functions in JavaScript
- The difference between parameters and arguments in JavaScript functions
- Short-circuit evaluation in JavaScript
- Recreating jQuery's basic "effects" in vanilla JS
- How to manipulate an element's classes in vanilla JS
- Reduce an array to a single value with vanilla JS
- How to scope your selectors in vanilla JS
- How to empty an element in vanilla JS
- Returning boolean values in JavaScript
- How to check if every item in an array meets a condition
- The nullish coalescing operator in JavaScript
- How I built a random quotes app with vanilla JavaScript
- How I built a top stories feed in vanilla JS
- How to get your Jekyll posts as a JavaScript array
- How to detect form submissions in JavaScript
- How to structure a JavaScript file
- How to build a JavaScript clock
- How to stop an infinite loop in Chromium
- My favourite ES6 features
- My approach to event delegation
- How I use event delegation with Reef
- The difference between nodeName and tagName
- How to get the active element in DevTools
- Resources for regular expressions
- Two ways to create a regular expression in JavaScript
- Array literals vs the Array() constructor
- Three ways to write a JavaScript function
- Guard clauses in JavaScript
- The simplest way to check the event target
- How the Array.prototype.slice.call() trick works
- Static vs live NodeLists
- Syntax errors vs logic errors
- How to get the last item in a JavaScript array
- String concatenation in vanilla JS
- Nodes aren't always HTML elements
- Name your variables explicitly
- Everyone has JavaScript, right?
- How to manipulate attributes in vanilla JS
- Array.indexOf() vs Array.includes()
- How to get the children of an element in vanilla JS
- Get an element's total width and height in vanilla JS
- The outerHTML property in vanilla JS
- How to check an email address in vanilla JS
- Understanding client-side JavaScript frameworks
- How to write an IIFE from scratch
- The difference between break and continue in JavaScript
- The textContent and innerText properties in vanilla JS
- The console.table() method in JavaScript
- What is the DOM?
- Properties and methods in JavaScript
- Dot notation and bracket notation in JavaScript
- Introducing JavaScript objects
- Understanding prototypes and inheritance in JavaScript
- The in operator vs the hasOwnProperty() method in vanilla JavaScript
- Never rely on the global event property in JavaScript
- Event flow in JavaScript
- The difference between event target and event currentTarget
- The difference between event.stopPropagation() and event.stopImmediatePropagation()
- The event.preventDefault() method in JavaScript
- Getting started with Svelte
- The instanceof operator in JavaScript
- An addClass() helper function
- How to check if an object has at least one property in JavaScript
- Named access on the window object
- Implicit return statements in JavaScript
- The const keyword in JavaScript
- Changing the context of the forEach() callback
- The flatMap() method in vanilla JS
- The difference between null and undefined in JavaScript
- Setting defaults for package.json
- How to check if a value is an array in JavaScript
- How to inspect JSON data in Chrome DevTools and Visual Studio Code
- When should you use a switch statement in JavaScript?
- Serialize form data into a query string in vanilla JS
- Serialize form data into an array in vanilla JS
- Serialize form data into an object in vanilla JS
- Serialize form data into a JSON string in vanilla JS
- Serialize.js: A tiny form serialization library