Tag: JavaScript

  • Converting a controller function into a class

    Converting a controller function into a class

    How to convert an AngularJS controller function into a class.

  • How to refactor ancient AngularJS code

    How to refactor ancient AngularJS code

    So you’ve got a project that still runs on AngularJS? Let’s refactor.

  • Let’s build a game

    Let’s build a game

    Let’s build an Oregon Trail-style game together using HTML, CSS and JavaScript

  • Classy goal writing

    For the last several posts, I’ve been writing goals in JavaScript like this: It starts to get tedious having to remember that I need an action, quantity and measurement whenever I want to write a goal. Instead of starting with a bare-bones object each time, I can create a goal prototype by defining a class.…

  • Dating goals

    No we’re not talking about romantic dating. I’m talking about adding due dates to goals to make them timely or time-bound. Let’s say we have a goal like this: It’s actionable, measurable, but lacks a time or due date. Let’s add one using a Date object. What I’ve done now is set a dueDate property…

  • Measuring goals

    How objects allow you to define units of measure for goals.