Playing with COVID-19 data: D3.js Bar Charts

Last week, we gathered COVID-19 statistical data.  This week, we are going to try to build some charts using D3.js.  D3.js is a javascript library that allows you to generate some fairly fancy charts and graphs but we are going to start with some basic bar charts.  Let’s take a look at a simple example. …

Continue reading "Playing with COVID-19 data: D3.js Bar Charts"

What the heck is hoisting?

This is a topic that I have been avoiding (mainly because I don’t feel like I understand it enough).  I figure that we have to tackle the idea eventually, though.  Hoisting is a JavaScript mechanism where variable and function declarations are moved (or hoisted) to the top of the scope before the code is executed. …

Continue reading "What the heck is hoisting?"

JavaScript Classes

Last week, we looked at arrow functions.  This week, I figured that we would look at Classes.  Support for classes was another thing added to JavaScript with ES6. See the Pen JavaScript Classes by Joe Steinbring (@steinbring) on CodePen. In the above example, there is a Person class and a Person2 class.  The difference between …

Continue reading "JavaScript Classes"

JavaScript Arrow Functions

ECMAScript 6 introduced some interesting new stuff.  We have already covered let and const, previously.  I figured that it is time to cover arrow functions, now. See the Pen Arrow Functions – Part 1 by Joe Steinbring (@steinbring) on CodePen. As you can see in the above example, at the very least, this new syntax …

Continue reading "JavaScript Arrow Functions"

Prototype.call() vs Prototype.apply()

This is going to be a relatively short post.  We have been doing a lot of [x] vs [y] vs [z] posts lately and this one is no different.  Today, I figured that we would look at Prototype.call() vs Prototype.apply().  Both apply() and call() are used to invoke functions.  The difference is that call uses …

Continue reading "Prototype.call() vs Prototype.apply()"