Truthy and Falsy:

‘Which terms are truthy and which are falsy’ is a common interview question for a JavaScript developer. Let’s try to clear the concept of truthy and falsy.

When the value of a declared variable is a number, then the numbers greater than 0 are truthy and if the number is smaller than 0 or equal to 0 then it would be falsy. But if we get 0 as a string then it is truthy.

In the case of string if anything assigned to a variable it is truthy even there is a whitespace between the double quote, that is also…


React is a component based declarative, flexible open-source JavaScript library. It is not a framework. It is a tool for building UI components. Here I will discuss 10 basic fundamentals of react

Component:

React apps have many components and they are reusable, no matter it is big or small.

A functional component is look like this —

import React from 'react';const Home = () => {return (    <div>         <h2>Hello world !</h2>    </div>    );  };export default Home;

Components name required to be start with capital letter otherwise it would be a mess-up of HTML elements and React elements as…


Function is one of the core concept of JavaScript. To perform a task it should take some input and return an output. Let’s explore about some basic core concepts of JavaScript.

Declaring a Function:

To declare a function, first you should write function keyword, then the name of function and parameter, finally the body of function between curly braces. Here is an example:


function sum(x, y){
return x + y;}

Local Variable:

The variable that declare inside a function is called local variable.

function fullName() {   let name = "Hello, I'm John Doe!"; // local variable  
alert( name );
}
fullName(); // Hello…

JavaScript is an easy learning programming language, also it is known as a scripting language. In JavaScript, Arrays are one of the most commonly used structures for sorting data. In this article I'll focus on the basics that every JavaScript developer needs in his/her daily life.

Creating a JavaScript Array:

There are many way to create an array in JavaScript, for example:

// Create an empty arrayvar emptyArray = [ ];// Create an array of Namevar kidsName = [ "Araf", "Mahveer", "Sarah", "Yasha" ];

indexOf() :

Array elements are accessed using their index number.

// to check positionVar kidsName = [“Araf”, “Mahveer”…

Farzana Nipa

I am a professional front-end web developer, passionate about coding. I always keep myself learning new things . I love what i do.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store