JS & Node

NULL vs UNDEFINED vs EMPTY In Javascript (A Simple Guide)

When it comes to defining “nothing” in Javascript, we have null, undefined, and empty. Just why do we need so many ways to define “nothing” in Javascript and what is the difference? null is used to explicitly define “nothing”. For example, var foo = null undefined happens when we don’t assign a value to a

NULL vs UNDEFINED vs EMPTY In Javascript (A Simple Guide) Read More »

Simple Javascript Minesweeper (Free Code Download)

Welcome to a tutorial on how to create a simple Minesweeper game with Javascript. Yes, Minesweeper is yet another of those classic games. There are plenty of “free-to-play” Minesweepers online, so here’s a slightly different one for those who want to learn – A minimal “no graphics” version, so you get to study the mechanics.

Simple Javascript Minesweeper (Free Code Download) Read More »

Add Watermark To Images In Javascript (Simple Examples)

Welcome to a tutorial on how to add a watermark to images in Javascript. Want to lessen the server load? Add a watermark to an image before uploading? Yes, it is possible using a canvas. To add a watermark to images in Javascript: Create a canvas element and image object. var ctx = document.createElement(“canvas”).getContext(“2d”); var

Add Watermark To Images In Javascript (Simple Examples) Read More »