Tips and tricks I learned throughout the years.

JavaScript is different. Experienced users that come from other languages have a hard time learning it, because it looks similar but operates differently. Here I will share all the insights I learned in the past few years. You will find it quite useful whether you programmed for years, or are just getting started.

JavaScript tips — Page 3

Making smooth animations with JavaScript's requestAnimationFrame

If you ever animated anything with JavaScript then you know that it is a very manual process. You call a function and make your changes incrementally until the animation is completed. With CSS3 you c…


Using a progress bar to load assets

It's inevitable. Images take a longer time to load then anything else on your page. If you are trying to load an image gallery for example, you have to give the user some feedback to let him know that…


Improving your JavaScript Performance

Computers are getting faster. Mobile devices are catching up too. Browsing the web on your phone no longer needs to be an inferior experience. But despite all this advancement in technology JavaScript…


Organizing your JavaScript

Relative to other languages, learning JavaScript is a much easier process. It's easy to use it to add a functionality to your website. For example making a pop up appear after a click is only a few li…


All you need to know about Type coercion in JavaScript

There are two ways to think of type coercion in JavaScript. One is to the dictionary definition, which is the conversion of values into common data types to facilitate operations like comparison. The …


Always avoid the DOM

The beauty of nodejs is that you don't have to work with the DOM. On the browser, that's where JavaScript power lies. The only problem is it is terribly slows. DOM access are the most expensive transa…


Creating a router in JavaScript for Nodejs

Every URL you type on this website are handled through one script. It is a common standard with many framework. The script in question is called a Router. It takes any URL you give it, and returns the…


My variables are set to the last index in JavaScript

JavaScript is known to host some quirky behavior. Most of the time however, all it takes is getting familiar with it to understand what is really happening and how to work with it. New and experience…