Michael Douglas Brett - Web Development

Hi, I'm Michael. I'm a front-end web developer based in the UK. This is my site.

Duplicate!

JavaScript FEDIQ

May 30th 2016

I've had a busy couple of weeks, so I'm going to phone this one in a little bit. The original problem was 'Make this work: duplicate([1,2,3,4,5]) // ([1,2,3,4,5,1,2,3,4,5])'. Click the 'Full post' link to discover this one weird trick to concatenate arrays...

Full post >>

Data Attributes! (What are they good for?)

FEDIQ HTML

May 5th 2016

Back to the FEDIQ, and this is my second attempt at answering this question. My first draft got swallowed by software update drama, which, let's be honest is unforgivable (of me). Anyway, 'What are data- attributes good for?' Absolutely some things!

Full post >>

No Stairway! Denied!

FEDIQ JavaScript CSS

Apr 7th 2016

A short-but-sweet FEDIQ hit today:

'Create a for loop that iterates up to 100 while outputting "fizz" at multiples of 3, "buzz" at multiples of 5 and "fizzbuzz" at multiples of 3 and 5'

Yup, it's FizzBuzz.

Full post >>

Events!

FEDIQ JavaScript DOM

Mar 30th 2016

It's Front End Developer Interview Question time! This installment is brought to you in association with our good friends at left-pad.io. I've looked ahead and decided that I'm going to take this one as a twofer: 'Explain event delegation' and 'Describe event bubbling'. Why not?

Full post >>

What Are The Differences Between Classes And IDs?

FEDIQ CSS

Mar 16th 2016

Another week(ish), another question from the Front End Developer Interview Questions. The original question was: 'What is the difference between classes and IDs in CSS?', but I'm going to stray slightly out of bounds and talk about IDs and classes in terms of HTML and the DOM as well. There are two reasons for this:

Full post >>

Front End Developer Interview Questions

FEDIQ HTML

Mar 2nd 2016

The repo Front End Development Interview Questions (FEDIQ) is a pretty famous one - starred over 20k times and even featured on an episode of The Changelog. I've mooched through it once or twice and absent-mindedly had a stab at answering the questions, generally responding to things like 'What does a doctype do?' with 'oh, you know...' and then just moving on to the next question or clicking away to something else. Everyone knows what a doctype does anyway...

Full post >>