Imagine if you transform your data like array for most of the time. Often times for loop with other variables are used to do the job. If it’s repeated than that code is extracted to its own function. Why not we extend the built in Array method and make it simple to use. Shuffle an […]
Tag: objects
In the past whenever I came across code snippets with the usage of call() and apply(). I would ignore them as they appeared to be on advanced level. It was scary for me, as any new thing is. Than I found this code snippet function add(){ console.log(arguments) //Arguments { 0: 1, 1: 2, 2: 3, […]
Categories
Current Date in Javascript
Current Date can be displayed by using javascript object Date(). Objects in javascript behave similarly as that of real objects, if we compare it with the laptop: which is an object with properties. Each laptop has color, wight, made, material, size etc. Same goes for javascript objects what has properties which define their characteristics […]