Authored on

Getting repo to push to server

This is a nice step by step re. getting local repo to deploy to remote server using a git Hook:

Sun, 06/21/2020 - 16:19

JS Reference VS Copy

If you make a copy of a string, number or boolean, the copy is not going to update when you change the original. However if you do the same with an array, this is just a reference so it will…

Sun, 03/08/2020 - 18:03

Useful Javascripty things

  • Use data-set within html to create nice tidy objects you don't have to cache before using.
  • Pipe is alt gr, shift and backslash on linux and shift shift backslash on windows…
Thu, 02/27/2020 - 15:24

Setting up JS workspace

Download node.js from (download recommended version). This should also download npm (node package manager).

The GUI did work but…

Mon, 02/17/2020 - 19:39

Notes on JS Arrow functions

The this variable does not work the same as in ES5 for arrow functions.

See lesson 108. on udemy course.

A common work around in ES5 is to declare a 'self' variable so that the…

Fri, 02/14/2020 - 11:13

Event bubbling and traversing the DOM

This is a means to find an element within the DOM based in it's parent items, in order to cause an event to occur with it is clicked etc.

We can only delete a child element from the DOM so…

Sat, 02/08/2020 - 15:13

IIFE: Immediately Invoked Function Expressions

We want to keep score hidden. We can do this by writing a function because of the way that scope chain works:


function game() {

  var score = Math.random() * 10;

Mon, 01/27/2020 - 16:57

Function returns function

You can write an if else statement or switch statement based on what is passed on in to the statement which will return an anonymous function based on what it was passed.

It returns an…

Mon, 01/27/2020 - 16:29

Notes on passing functions as arguments

Functions can accept other functions as arguments, for example in an event listener.

If you have some arrays and want to do calculations with them, this could be an example.


Mon, 01/27/2020 - 16:00

JavaScript Closures

An inner function has always access to the variables and parameters of it's outer function, even after the outer function has returned.

This is because it is still present in the scope…

Mon, 01/27/2020 - 14:22

Objects in Javascript

Everything is an object in JavaScript, oh apart from:

Primitives: Numbers, Strings, Booleans, Undefined, Null


But these things really are

Fri, 01/24/2020 - 18:55

JavaScript Functions - Expressions and Declarations

This is a quick post for me to describe the difference between a function declaration and a function expression in JavaScript, and the use case for both. 

A function declaration looks like…

Thu, 01/16/2020 - 12:42

Pattern Lab training

I interpret this tool as being a means to build a site using components, much like a Drupal site, but then building the styling in to this too, so that they can be re-used in multiple contexts…

Tue, 11/26/2019 - 14:34

Rock Paper Scissors Tutorial

This is a post about the Rock Paper Scissors tutorial provided by FreeCodeCamp on YouTube. (

I worked through this tutorial in October and I…

Wed, 11/20/2019 - 14:01

Local development set up for theming

Based on info from…

Tue, 10/29/2019 - 20:07