Posts in this category:

Find nearest number in array

Find the closest number in an array JavaScript

by Gav 12/11/2019

Would you like to match the closest number in an array using JavaScript? Find out how to achieve this using both reduce() and sort().

Get the difference JavaScript

Get the difference between 2 numbers JavaScript

by Gav 12/11/2019

Getting the difference between 2 numbers in JavaScript isn't as simple as it sounds. Let's look at 2 methods for reliably returning the difference.

String Interpolation JS, SCSS, SASS

String interpolation in JavaScript, Sass and scss

by Gav 01/11/2019

Use Sass variables inside css variables and strings. Learn how to interpolate strings in JavaScript(es6), Sass and scss.

Valid html check

Valid HTML element tag check: JavaScript

by Gav 31/10/2019

Learn how to check for valid HTML element tags by converting them to string representations with this simple JavaScript function.

eval() alternative

Calling a function using a string: JavaScript

by Gav 29/10/2019

Call a function using a string in JavaScript: a safe alternative to eval().

Web Component

Web Components tutorial: Custom Elements in JavaScript

by Gav 23/10/2019

What are web components? Learn about web components, the shadow DOM, styling and lifecycle callbacks in this JavaScript tutorial series.

forEach loop JavaScript

HTMLCollection forEach loop – Convert object to array: JavaScript

by Gav 17/10/2019

4 ways to convert array-like objects, such as HTMLCollection and NodeList, to JavaScript arrays for access to array methods like the forEach loop.

Detecting Keypress JavaScript

Detect single and multiple keypress events: JavaScript

by Gav 16/10/2019

Learn how to use event listeners to detect and handle single and multiple keypress events in JavaScript. Add modifier keys to your application!

Adding Bulma to Nuxt

Adding Bulma to Nuxt.js with changeable variables

by Gav 12/04/2019

Using Bulma but don't know how to integrate it with Nuxt? I'll show you how to load Bulma into your Nuxt project with full control over variables.