Higher Order Functions in Javascript #9

Hello coders 馃憢, This is going to be our 9th question of the front-end interview questions series you can access all the questions by clicking here Higher Order Function A function that returns a function or takes other functions as arguments is called a higher-order function. 鈥擬DN Let鈥檚 write two functions findEven and findOdd to filter even and odd numbers. We will refactor them latter. const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; function findEven(nums) { const results = []; for (let i = 0; i < nums....

February 18, 2024 路 3 min 路 Mohammad Shahzaib

What Is an IIFE (Immediately Invoked Function Expression) in Javascript #8

Hello coders 馃憢, This is going to be our 8th question of the front-end interview questions series you can access all the questions by clicking here IIFE (Immediately Invoked Function Expression) IIFE (Immediately invoked Fuction Expression) is a fuction that calls (invokes) as soon as it is defined. you don鈥檛 have to call the function explicitly. You have to wrap the function inside parentheses and add another parentheses at the end (....

February 4, 2024 路 3 min 路 Mohammad Shahzaib

Pass by Value and Pass by Reference in Javascript #7

Hello coders, This is going to be our 7th question of the front-end interview questions series you can access all the questions by clicking here Before proceeding further we should have a idea about primitive and non-primitive data types if you are not clear about them click here before moving further. Everything in Javascript is pass-by-value except objects, when we pass objects, the value passed is actually the reference address of it....

January 28, 2024 路 2 min 路 Mohammad Shahzaib

What Is NaN Property in JavaScript #6

Hello readers, We have covered five questions from my front-end interview questions series until now, and today we are going to discuss the 6th question of the series. What is NaN NaN stands for Not-a-Number, In JavaScript it represents a value that is not valid number. It is a global value meaning it is accessible from anywhere in our code. How NaN is created? Let鈥檚 see some examples that returns NaN....

January 21, 2024 路 2 min 路 Mohammad Shahzaib

Is Javascript a Statically Typed or a Dynamically Typed Language #5

This is the 5th question of the front-end interview questions series. Dynamically-typed languages are those (like JavaScript) where the interpreter assigns variables a type at runtime based on the variable鈥檚 value at the time. 鈥擬DN JavaScript is a dynamically-typed language, Meaning data types of variables are determined by the value they hold at runtime and can change throughout the program as we assign different values to them....

January 14, 2024 路 2 min 路 Mohammad Shahzaib

Difference Between Var Let and Const Keywords in Javascript #4

We have covered the three most common front-end interview questions untile now 馃槉, and this is going to be the 4th question of the series. What Are the Different Data Types Present in Javascript? What is Hoisting in JavaScript? Difference Between == and === Operators in JavaScript Let鈥檚 discuss the fourth one without any further ado 馃憞 Introduction In javascript we can use var, let, and const to create variables and var is an old method to declare a variable in JavaScript....

January 7, 2024 路 5 min 路 Mohammad Shahzaib

Difference Between == and === Operators in JavaScript #3

This question is the 3rd question of the front-end interview questions series. And It is an important question and often come up in front-end interviews. Let鈥檚 discuss this 馃憞 Introduction In JavaScript, there are two methods for comparing data or data types: the == operator, known as loose equality, and the === operator, referred to as strict equality. Both operators evaluate the provided data and return a true or false value based on whether the data is same....

December 31, 2023 路 4 min 路 Mohammad Shahzaib

What is Hoisting in JavaScript? #2

This is going to be the second quesion of the front-end interview quesion series. If you want to check the first one click here . Hoisting Hoisting is a very important concept of JavaScript which can introduce bug or cause unexpected behavior in your code if you鈥檙e not aware of how it works. JavaScript Hoisting refers to the process whereby the interpreter appears to move the declaration of functions, variables, classes, or imports to the top of their scope, prior to execution of the code....

December 24, 2023 路 3 min 路 Mohammad Shahzaib

What Are the Different Data Types Present in Javascript? #1

I was thinking to create a series of the most common Front-end interview questions and finally I have made a list of the questions and this is going to be the first question of that list. Let鈥檚 discuss the question without further ado! According to the latest ECMAScript standard there are 8 types of different data types. Out of which seven data types are Primitive and one is Non-Primitive (also known as reference type)....

December 17, 2023 路 4 min 路 Mohammad Shahzaib