Hitesh Kumar

12 Flips | 2 Magazines | 2 Likes | @HiteshKumar6gkf | Keep up with Hitesh Kumar on Flipboard, a place to see the stories, photos, and updates that matter to you. Flipboard creates a personalized magazine full of everything, from world news to life’s great moments. Download Flipboard for free and search for “Hitesh Kumar”

Accessing the 3rd element - 'Orange' - from the 'popsicles' array

Select all the correct choices that can be used to access the 3rd element - 'Orange' - from array popsicles.

Are JavaScript strings immutable?

The string str1 is copied to another variable str2, then changed to a different string, and then it's first element str1[0] is assigned a different …

JavaScript

Are arrays in JavaScript sparse?

An element is added at [length+1] into array dinosaurs, which already has 2 elements in it. What is the value of dinosaurs.length now?

Overloading one operator in terms of other

It is important for the consistency and reusability of code that while overloading an operator we should try to implement it in terms of the other …

Comparing the two false-test functions

Beyond the boolean values true and false, JavaScript has the concept of variables and literals being 'truthy' or 'falsy'. This concept is at the …

Modify a data member in a const method

The class Book below has a const method - Author() - that returns the name of book's author. As the author's name is not frequently accessed, we are …

A unary minus operator implementation that meets given requirements

Iteration scoped for-loop variables with keyword 'let'

Pre-ES6 does not have block scope variables. A block is any code enclosed in braces {..}. The smallest possible scope in pre-ES6 Javascript is a …

No Block Scope In JavaScript

Scope of a Javascript variable is its execution context, which is either the function in which the variable is declared or - for variables declared …

Invoking Immediately-Invoked Function Expression (IIFE) with unary operators

An Immediately-Invoked Function Expression (IIFE) is a Javascript pattern that invokes an anonymous function at declaration. This pattern is used to …