javascriptHow to Code The Snake Game Using JavaScript - Full Tutorial
We've all seen the infamous snake game. It was a staple of non-smartphones back in the day. In this post, we'll be building something similar...
javascriptCoding A Card Deck In JavaScript
In this post, I will be going over how to build a deck of cards in JavaScript, that can be used for future projects or future games, such a
javascriptMap vs FlatMap in JavaScript: A Developer's Guide
If you've been writing JavaScript for a while, you've probably used `map()` countless times. But have you ever run into a situation where `m
javascriptThe Best Way to Check for an Empty String in JavaScript
A student recently asked me what the best way to check for an empty string in JavaScript was. I answered in the best way that I knew how an
javascriptHow to Work With Multiline Strings in JavaScript
Today I am going to talk about a seemingly boring topic, strings in JavaScript. But stay with me, as we'll be going into some low-level
javascriptHow to Generate GUIDs in JavaScript
Generating unique ID's is a common practice in most modern web applications. Whether you're building APIs, databases, or client-side applica
javascriptHow to implement a "Load More" button in JavaScript
Infinite loading, also referred to as infinite scrolling, is a popular UI/UX technique in which a user does not have to leave the page in or
javascriptCreating functions dynamically with JavaScript
The Function constructor is something that isn't usually talked about in JavaScript circles, but it is a useful mechanism to have
javascriptHow to Code a Tetris clone In JavaScript
Tetris is one of the first games that many of us played growing up. It's fun and challenging and playing a single level can take you from a
javascriptHow to Use the Vibration API for Haptic Feedback in Mobile Web Applications
The JavaScript Vibration API is a powerful yet simple tool that allows developers to trigger vibrations on mobile devices directly through t
javascriptMicro-optimizations in JavaScript: Do They Actually Matter?
I've been writing JavaScript for over 2 decades, and I've seen countless debates about micro-optimizations. Should you use `for` loops inste
javascriptHow to render a file image preview in JavaScript
A pretty cool feature that you can add to your file upload elements, if you are working with images, is the ability to render a preview on t
javascriptHow to Implement a Substitution Cipher in JavaScript
Cipher's are a good way to put your coding skills into practice. They are usually relatively simple to implement in terms of the amount of c
javascriptHow to Code Tic Tac Toe in JavaScript
In this post we will be building the ever popular Tic Tac Toe game in JavaScript. It's a relatively simple implementation and the most comp
javascriptCreating a right-click contextual menu in JavaScript
Right click contextual menu's are a great way to hide menu items that are less commonly used, and that you want to keep out of sight until
javascriptHow To Paginate Through A Collection In JavaScript
Pagination is one of those annoying features that aren't fun to implement in any language, but that is pretty much essential for a good UI.
javascriptBuilding Tetris In JavaScript Part 2
Welcome to part 2 in this building Tetris tutorial. If you missed part 1, feel free to check it out here. In this second part, we'll be fin
javascriptAdd Pagination To Any Table In JavaScript
Pagination is one of those things that everyone hates implementing on their websites, and that we avoid doing until the data size calls for it.
javascriptCoding A Calendar In JavaScript
In this tutorial I will cover rendering a calendar onto a webpage with a few lines of JavaScript.
javascriptHow to Create a Basic Text Editor In JavaScript: A Step by Step Tutorial
Creating a rich-text editor in JavaScript isn't as difficult as many may think it is and can give you the much needed control over your code
javascriptA Quick Guide To JavaScript Touch Events
The JavaScript specification now supports touch event handling for interactions with mobile devices and tablets.
javascriptHow to add sorting to any table in JavaScript
And you never thought that algorithm class from college was going to pay off. In this post I'll be going over how to add the ability to sor
javascriptImage and Text SlideShow In JavaScript
Last time I made a quick tic tac toe clone and today, at the request of a friend, I will make an image/text slideshow widget. We see them a
javascriptGame Development And Prototyping In JavaScript
In my previous post I talked about why JavaScript is such a great language for newcomers to the programming world due to it's ability to ge
javascriptHow To: Make A Game Using Crafty JS Part 2
Welcome to part 2 of my Crafty.js How To. On the last post I started building a quick game that I made up using Crafty.js, a JavaScript-onl
javascriptBuilding A Side Scroller With Crafty.JS
It's time to take what I've learned about Crafty.js in the past couple of weeks and to put it to use and build a side scroller game. Also,
javascriptDrag And Drop Image Upload In JavaScript
File Uploads have yet to really catch up with the times and with technology. Many reasons for this. Security being a major one. It's an ope
javascriptHow to stick an element to the page when scrolling
Keeing items on the page when scrolling downwards can be a beneficial feature when you have elements that ideally land somewhere near the to
javascriptHow to abort a fetch after 'n' seconds in JavaScript
When making a fetch request in JavaScript, there might be a scenario where you would want to cancel the request if it's taking too long. Thi
javascriptHow to Ctrl + S to save in JavaScript
The Ctrl + s shortcut has become so natural as a saving mechanism, that I find myself doing it automatically many times with websites.
javascriptTaking a look at jQuery's performance
jQuery is a great JavaScript library for getting things done quickly without having to put too much thought into how you're going to be doi
javascriptThe simplest way to create dynamic modal pop-ups in JavaScript
Modal windows are an important UI/UX tool when it comes to pretty much any type of application, whether web, mobile or even your local ATM m
javascriptHow to add color and style to the console.log
The developer console in a browser is one of the most valuable tools for any web designer and web developer. Not only does it tell you what'
javascriptJavaScript Events: DOMContentLoaded vs load
Most programmers are familiar with the 'load' event listener in JavaScript.
javascriptHow to Check for Memory Leaks in JavaScript
Memory leaks are one of those bugs that are critical in nature and difficult to detect. Unlike a syntax error that breaks everything immedia
javascriptHow to implement the Screen Wake Lock API in JavaScript
The Screen Wake Lock API allows web applications the ability to prevent the client device screen from locking or dimming after the
javascriptWeb Storage API: LocalStorage vs. SessionStorage
When developing modern web applications, it’s common to store some data directly on the user's browser. Whether it’s user preferences, sessi
javascriptA Look at the Drag and Drop API in JavaScript
The HTML5 Drag and Drop API offers a simple method for allowing the movement of HTML objects around a webpage. In the past, this typically i
javascriptWhat are JavaScript Proxies and how they work
One of the most powerful, but not often seen or used, features of JavaScript are proxies. Proxies were introduced in ECMAScript 6 and they a
javascriptJavaScript Has a Gamepad API That No One Ever Talks About
The JavaScript Gamepad API has been around since 2012 and has solid support across most modern browsers. Chrome, Firefox, Safari, Edge, they
javascriptWhat is the best way to learn JavaScript?
JavaScript has quickly become one of the most widely used and popular programming languages of the past decade. Thanks in part to technologi
javascriptShould You Use a JavaScript Framework?
I've read far too many articles this week about why developers should avoid using JavaScript frameworks in lieu of plain old vanilla JavaScr
javascriptHow To Effectively Use 'async' and 'await' in JavaScript
Promise based asynchronous code in JavaScript has typically not been the easiest to write. Dealing with promise-chaining and nested callback
javascriptWhat is Bun, the new JavaScript runtime on the block
Bun is the ultra fast JavaScript runtime that has taken the internet by storm and that is set to dominate the JavaScript development market
javascriptHow to implement ROT13 in JavaScript
ROT13 is a specific implementation of the Caesar cipher that replaces each letter with the letter that is 13 places down the alphabet. For e
javascriptWhat does the JavaScript Temporal.PlainDate method do
One of the latest additions to the ECMAScript 2024 standard is the Temporal.PlainDate method which is a part of the Temporal API i
javascriptIterating through arrays in JavaScript
In this post we will go over the various ways that you can iterate through a given array in JavaScript.
javascriptUsing 'debugger' to set breakpoints in JavaScript
What are breakpoints? Think of them as pauses that you can add to your code temporarily to see just what is happening at that point in time.
javascriptWorking with default function parameters in JavaScript
Default function parameters are a great addition to the JavaScript specification as of ES2015 that allows us to give a default starting value to named parameters in a function.
javascriptCreating a timer in JavaScript using setInterval
Performing certain tasks on a website every 'n' number of seconds can be very useful when trying to achieve certain effects, such as creating on-screen visible timers, polling for data or even counting down towards some event.
javascriptChecking if users are offline with navigator.onLine
"Must be online to continue". "You have been disconnected". "Error: Status code: YSLFJLFJSKDFJS"We have all seen that message appear at some
javascriptWhat exactly is the JAM Stack?
If you are fan of JavaScript then you no doubt have encountered the term JAMStack at some point in your career. In this post I'm going to br
javascriptWorking with Sets in JavaScript
ECMAScript 6 introduced the new Set type into its toolset. What are Set's? Essentially they are an ordered list of values that hav
javascriptWorking with Maps in ECMAScript 6
In my last post I went over the Set() data structure that was introduced with ECMAScript 6. Today I will be going over t
javascriptWorking with ES6 classes and objects
ES2015 introduced a new syntax into the JavaScript specification that finally allows us to create classes in a much cleaner way than th
javascriptHow to create a calculator in JavaScript
You may think you know what a calculator is. But it's not until you begin to code something that you get to see just how complex it can be.
javascriptHow JavaScript optimizes tail calls
A commonly seen useful shorthand when writing code is the ability to call a function as a return statement.
javascriptCustom JavaScript pagination of objects
This is a follow up to my post How To Paginate Through A Collection In Javascript article. In this updated version I wi
javascript3 tips when learning JavaScript
If you are looking to become a web developer at any point in time, then JavaScript is going to have to be your go to programming language. A
javascriptHow to add character count to any textarea in JavaScript
If you are building a user entry form of any kind, you often times want to limit the number of characters that a user is allowed to enter in
javascriptCapitalize the first letter of any string in JavaScript
While there is no direct bulit-in function in JavaScript (yet) to capitalize the first letter of a string, there are various ways that you c
javascriptIs it still okay to use jQuery in 2020?
I get this question asked all of the time from my students. And my answer will typically be something like "Why is it wrong to use jQuery?".
javascriptHow to bind events in JavaScript to dynamic elements
Thanks in part to Ajax and front-end heavy frameworks like React and Angular, much of a website these days is generated in real-time dynamic
javascriptTop 4 jQuery alternatives to consider switching to
jQuery is probably still the most popular and widely used JavaScript library out there today, and that's mainly due to its longevity. Latest
javascriptHow use-strict affects your JavaScript code
You might be familiar with seeing the following directive at the top of JavaScript files.
javascriptHow to implement infinite scrolling in JavaScript
Infinite scrolling is a popular technique that social media sites tend to use often, mainly on mobile devices, in which a user naturally scr
javascriptImplementing a Caesar Cipher in JavaScript
Cipher's are a great way to practice your logical coding skills. Plus, they're kind of fascinating. Ciphers have been used for hundreds, if
javascriptHow to drag elements in JavaScript without jQuery
In this article, we are going to implement the draggable functionality (found in jQuery) using vanilla JavaScript with just a few lines of c
javascriptHow to create console log groups in JavaScript
Most programmer's are familiar with a browser's built in debugging tools. This includes the standard Inspector used to view the DOM elements
javascriptWorking with the destructuring assignment in JavaScript
The destructuring assignment in JavaScript is one of those things that you might never see yourself using, but that might be just the thing
javascriptHow to deep clone a JavaScript array
If you are looking to make an identical copy of an array in JavaScript,
then using the default assignment operator will not do the trick as
javascriptGetting Started With JavaScript's WebRTC
WebRTC is a free open sourced technology that allows your everyday browsers to perform Real Time Communication through a set of simple API'
javascriptTaking A Look At JavaScript's WebGL
Just recently a friend of mine showed me a game running on a web browser and it was an amazing experience. The game wasn't particularly ama
javascriptHow to Get Started With TypeScript<br>
TypeScript is a free and open source superset of JavaScript and was created and is maintained by Microsoft. It offers many OOP patterns tha
javascriptTaking A Look At the Battery API In JavaScript
Does your browser know your battery status? You bet it does. Let's talk about that.
HTML5 keeps adding more and more features to its lin
javascriptPlay My Classic Snake Game
On this rainy day in Los Angeles, stay home, drink too much coffee and enjoy a classic game from our teen years (maybe). I coded this sna
javascriptHow To: Make A Game With Crafty JS Part 3
This is a follow up to my last two Crafty.js posts which you can find in part 1 and part 2 in those links, which covered the basics of gett
javascript'Secrets Of The Javascript Ninja' Review
I "know" JavaScript, the way that a new college graduate "knows" every programming language ever made. When I first graduated from college
javascriptTrying Out WinJS Part 1
Another week, another new technology to learn. This week I'll be using WinJS for the first time, also known as The Windows Library For Java
javascriptA Beginners Guide To JavaScript
JavaScript is a great language for anyone just starting to code for a variety of reasons. It's lightweight, runs fast and most importantly
javascriptA Quick 5 Minute Guide To Angular JS
Angular.js is a fairly newcomer in the JavaScript framework world. It was first introduced in 2012 by a Google employee, and has since been...
javascriptA 5 Minute Guide To Knockout JS
In the spirit of trying out new and interesting Javascript frameworks, and just new technologies in general, this week I take Knockout.js f
javascriptHow to Get Started with the Google Maps JavaScript API
There is no better way to share a location than with a map and a marker on it. The universal indicator of map based location in this and ag
javascript"Click To Enlarge" Script With Pure JavaScript
Click to enlarge is a common feature on many sites nowadays. And while it may seem like a trivial feature to add to your website, just try
javascriptModal Windows With Pure JavaScript
If you're reading this post, then you are familiar with the concept of modal windows. But just in case you aren't here's a quick recap. Mod
javascriptCoding A Calendar In JavaScript: Part 2
The following is the follow up to the ever so popular Coding a Calendar in JavaScript, in which I created a calendar widget in JavaScript.
javascriptJavaScript Bubble Sort Algorithm Explained: A Beginner’s Guide
Sorting is a common task that is required of programmers many a time. You need to sort things such as search result sets to standard lists o
javascriptHow to use block bindings in ES6
For a long time now, declaring variables using the standard var keyword was commonplace in JavaScript. While super easy to use, it was not w
javascriptHow the Spread operator works in ES6
The Spread operator is one of those concepts in JavaScript that, while you appreciate what it does, you just can't ever quite seem to find t
javascriptA quick look at prototypes in JavaScript
All JavaScript objects inherit properties and methods from a prototype. Prototypes are the mechanism by which JavaScript objects inherit fea
javascriptHow to copy to clipboard in JavaScript
Sure you can always just highlight text and then ctrl+c, but sometimes due to text constraints (large text) or just for ease of use to your
javascriptWhat does the future of JavaScript look like?
It wasn't that long ago that JavaScript was shunned in the coding community as a small-time scripting language used mainly to hide and show