How to “get into computers”

Every now and then, I’ll get a question along the lines of “How do I get into computers? Is there somebody willing to train me?”  That isn’t an easy question to this answer.  A lot of people don’t seem to like this answer and some even consider it to be derogatory.  No matter what profession …

Continue reading "How to “get into computers”"

Object.seal() vs Object.freeze()

So, you want to protect an object that you created in JavaScript?  With Object.seal() and Object.freeze(), you have two solid options that do slightly different things.  While Object.seal() prevents new properties from being added to the object and marks all existing properties as non-configurable, it still lets you change the values of properties.  Object.freeze() on …

Continue reading "Object.seal() vs Object.freeze()"

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"

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"

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"

Fixing JWS.app: The “Superfeed” (Part 1)

One of the goals for JWS.app was for it to pull in activity from a bunch of sources and update itself.  That is the reason why I created the “superfeed”.  Let’s start by looking at its current state. See the Pen JWS.app – Superfeed (Before) by Joe Steinbring (@steinbring) on CodePen. Getting the content from …

Continue reading "Fixing JWS.app: The “Superfeed” (Part 1)"