Detecting Battery Status in JavaScript.

Learn how to detect battery status in JavaScript using Battery Manager. Image by Brett Jordan. The BatteryManager interface provides ways to get information about the system’s battery charge level. We can use the Battery Manager to detect charging state Battery percentage Time needed to charge 100% The remaining time until the battery is completely discharged. First, let’s …

Dot vs Bracket Notation in Accessing JavaScript Object.

Learn when to use dot and bracket notation in JavaScript. Dot vs Bracket notation in JavaScript We can access the property of an object by Dot notation Bracket notation Dot Notation This is the most popular and most used way of accessing the property of an object. This makes code more readable. Dot notation is …

Six Ways to Create Objects in JavaScript

Learn six different ways to create an object in JavaScript. image by Dawid ZawiÅ‚a There are multiple ways to create Object in Javascript, I have listed six of them which I learned while reading. So I would like to share that with all JavaScript geeks here. First Way → Using Assignment This is how most of …

In-Depth Introduction to Call Stack in JavaScript.

Learn how the function executed in JavaScript. Image from Eaters Collective What is Stack ? Stack is a Data structure, which is similar to an array, except that we cannot access the elements using the index directly and we can only insert and delete elements at the Top of Stack(ToS). We majorly perform 2 operations in …

Design a site like this with WordPress.com
Get started