Practice

Make an inline element break out of its line
When an inline element grows in size, its containing line grows with it.
This behavior makes creating elements like drop-downs or tooltips problematic because they contain hidden child elements which must "break out" of their parent's line.
Setting the child as absolutely positioned relative to the parent won't work if they must be the same size.
An absolutely positioned element resides out of the document flow and can't push its parent to contain it when it becomes larger than it.
Below is a solution:
2018-9-5
htmlinline
Scrollbar behavior
If an HTML element has a set height that height will include its scrollbar height.
If not, the scrollbar height adds to the content height.
As demonstrated here:
2018-9-5
htmlinline
Dark tab design
Exploring a dark tab design:
2018-5-23
htmlUI
3-pane design
Exploring a 3-pane design, made with CSS Grid:
The panes can be arranged in 7 ways. Later Javascript can be used to switch between modes.
The main advantage of this (apart from easy layout) is how panes can be reordered without changing their position in the source. This way tools like React can avoid useless re-rendering.
2018-5-19
htmlUI
Breadcrumb with css-only arrows
Exploring a breadcrumb design, in which the arrows are made with css only:
2017-4-17
htmlUI
Demoing flex-basis and flex-grow
2017-7-28
htmlflexbox
Exploring a tooltip (or text bubble) design with an svg arrow
2017-4-16
htmlsvg
Exploring a breadcrumb design with an svg arrow
2017-4-14
htmlsvg
JS passes primitives by value and objects by reference.
Demo:
2017-4-14
javascript
Christmas Tree
This was a programming assignment from high school - it was about making a Christmas tree in C -. Back then, it proved to be very difficult so I did it again to if it was easier this time around.
2017-7-6
javascript
Demoing javascript's labeled breaks:
2017-7-6
javascript
Demoing bcrypt

Available at npmjs.com/package/bcrypt.
The bcrypt package needs compilation, if you'd prefer to avoid that and use a js-only - albeit slower - package you can use: npmjs.com/package/bcryptjs

2018-9-24
javascript
try-catch blocks and asynchronous functions

Asynchronous functions are executed out order in the call stack. When the try-catch block executes, it will only "see" a successful call to a Webapi, and when it's the turn for the Webapi to execute the try-catch block will have already completed having seen no exceptions.
And if an exception is thrown it won't be caught (Which in Node means an app crash).

2015-9-4
javascript
This was my first iteration of the library continuous-arrays

Suppose you declare several nested arrays and have a maximum of only one element per line, this library would retrieve them based on the number of their corresponding line.

2017-7-18
javascript
Demoing Bubbling and Trickling Events in Javascript

Bubbling: An event starts on the element that fired it, then bubbles up its parents.
Trickling: An event starts with the outermost element first then trickles down until it reaches the element that fired it.
Mixed: If bubbling and trickling event handlers are mixed, Trickling happens first.

2015-5-31
javascriptbrowser
Generating a PDF File using react-pdf

import React from 'react';
import { Document, Page, Text, View, StyleSheet } from '@react-pdf/renderer';

const styles = StyleSheet.create({
  page: {
    flexDirection: 'row',
    backgroundColor: '#E4E4E4'
  },
  section: {
    margin: 10,
    padding: 10,
    flexGrow: 1
  }
});

const MyDocument = () => (
  <Document>
    <Page size="A4" style={styles.page}>
      <View style={styles.section}>
        <Text>Section #1</Text>
      </View>
      <View style={styles.section}>
        <Text>Section #2</Text>
      </View>
    </Page>
  </Document>
);

2017-7-6
javascriptreact
Exploring an expandable treepanel design

Nested elements allow for easy positioning

2016-11-26
htmlcsstree
Exploring an static treepanel design

This design doesn't rely on nested components, making it compatible with windowing

2016-5-1
htmlcsstree
Replacing (not) matching characters in a string with a regular expression

const sanitizedString = testString.replace(/[^a-zA-Z0-9]/gm, "");

2020-2-5
jsstringregex
Function to check if a string is a palindrome

function isPalindrome(testString) {
  const sanitizedString = testString.toLowerCase().replace(/[^a-zA-Z0-9]/gm, "");
  const sanitizedStringReversed = Array.from(sanitizedString).reverse().join("");

  return sanitizedStringReversed === sanitizedString;
}

2020-2-5
jsstringregex