Playing with more tabular data

Previously, we looked at ways to display tabular data on a webpage.  Let’s pick up where we left off, but with more data.  The last time, the data was hard-coded into an array.  This time, let’s use Axios to load some fake data from JSONPlaceholder. See the Pen Table Pagination – Example 1 by Joe …

Continue reading "Playing with more tabular data"

Var vs let vs const in JavaScript

The next post in our X vs Y vs Z series is var vs let vs const.  I’ve wanted to cover this for a little while.  Let and const were added to JavaScript with ECMAScript 6.  Var has been around a bit longer. Var is used to declare a function-scoped or globally-scoped variable.  Var declarations …

Continue reading "Var vs let vs const in JavaScript"

Block vs inline vs inline-block

I’m not sure that this concept is universally understood.  I figured that it is time to take a swing at it. According to w3schools, a block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can). See the Pen …

Continue reading "Block vs inline vs inline-block"

Living with an electric car in Wisconsin: The Range

Back in May, I drove my new 2016 e-golf out to Madison and it left me thinking that it’s not a great option for that drive.  With the 24.2-kWh battery pack, my car has an EPA estimated range of 83 miles (which should be plenty of range to get there).  In practice, the range is …

Continue reading "Living with an electric car in Wisconsin: The Range"

Cookies vs localStorage vs sessionStorage in JavaScript

Back in 2012, I posted How to store JavaScript values persistently, locally (a post that is apparently a bit broken).  I figured that it might be time to revisit the topic. Let’s start by looking at how to create and read cookies, first. See the Pen How to use cookies! by Joe Steinbring (@steinbring) on …

Continue reading "Cookies vs localStorage vs sessionStorage in JavaScript"

Living with an electric car in Wisconsin: The Battery

One of my big concerns when I bought my 2016 VW e-Golf was how long the battery pack would last.  As we established in the previous e-Golf post, if it lasts as my daily driver for 5 years, it should effectively pay for itself.  I’m not terribly worried about the battery degrading that fast. Fully …

Continue reading "Living with an electric car in Wisconsin: The Battery"

3 ways to concatenate strings with JavaScript

I genuinely thought that I had covered this topic already.  It appears that the closest that I came was “PHP: Fun with strings” (back in 2014), so let’s do it now? See the Pen String concatenation in JavaScript by Joe Steinbring (@steinbring) on CodePen. The three methods that I’m using about are concat(), “[string 1] …

Continue reading "3 ways to concatenate strings with JavaScript"