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()"

Did you know that you can use Google Sheets as a JSON API?

You don’t necessarily need to write server-side code for everything.  Sometime there is a much easier solution.  Did you know that you can use Google Sheets as an API endpoint?  Let’s take a look at a quick example. For a few years now, I have been archiving my tweets as Google Sheets documents.  There is …

Continue reading "Did you know that you can use Google Sheets as a JSON API?"

Playing with the OpenWeather API: The basics

Ever since Apple bought and shut down Dark Sky, I have been struggling to figure out what to replace it with.  I figured that this would be a good excuse to play with some weather APIs.  I have done this once before but that was with Rivets and YQL (neither of which I can necessarily …

Continue reading "Playing with the OpenWeather API: The basics"

Playing with WebRTC: Taking still photos

This is going to be a pretty quick post.  I was playing with an MDN Tutorial on WebRTC and started wondering what I could do with it. Here’s how the basic functionality works: See the Pen JavaScript Photo Booth – Part 1 by Joe Steinbring (@steinbring) on CodePen. So, I was thinking about the post …

Continue reading "Playing with WebRTC: Taking still photos"