Month: January 2019

Made by Marvin Drude

Useful features in JavaScript ES6

Constants The support of constant variables was added in ES6. This allows to define variables which cannot be altered after first initialization. Although be careful, if for example you define an object as constant, you can still alter the object itself, for example adding new properties. String Interpolation Everyone knows the string concatenation from before: …

JavaScript Classes ES5 vs ES6

I just wanted to show the difference between classes in JavaScript ES5 and ES6. Let’s start with ES5 and the decleration of the class itself. As you can see, we declare a class and its constructor just like another function. Having done this we can continue with beginning to write methods of the class Animal. …

Default Parameters in JavaScript ES6

If you ever programmed in other languages than JavaScript, you are might be familiar with the concept of default parameter values if given parameter is not passed through. This concept exists in C# for example. We all know how tiring it is to do the checks for parameters in ES5. In this example, the log …

JavaScript Animation with timings

I see alot of people use big bloated libraries to animate HTML. Besides having the option to do alot of those things with pure CSS, you might still want to have the control using JavaScript to have more possibilities. I am going to show you the whole code first and after that I am going …

CSS Centering is not hard

Many people think centering content in CSS is difficult, so I thought I am going to put together a list of useful tips. Vertical I must admit that centering vertically is harder than it should be. Inline-elements Just apply same padding in order to have it appear vertically centered. Block-elements This works for every block …

Node.js socket.io simple drawing example

Introduction In the following article I am going to show you how to setup a simple Node.js application with socket.io and express in order to have live bidirectional communication between http client (Browser) and your server. You should already have a basic understanding of JavaScript, HTML, CSS for this tutorial. Requirements In order to follow …