What is truthy and falsy value in javascript?

In javascript truthy and falsy values are:

Truthy values

“..”‘0’[]{}‘false’

Falsy values

0“”undefinednullNaNfalse

What is the difference between double equal (==) or triple equal (===)

In javascript language double equal check only value but triple equal check value and type.
Double equal only check the value

Is it farmwork or a library?

Every React developer 1st knows that react.js is a library of Javascript. It’s not exactly a framework. React focuses on one thing that is building user interfaces. extremely easy to mix it with other 3rd party libraries. It is a declarative, efficient, and flexible javascript library.

Server-Side Rendering

Server-side rendering is a better experience for users because they receive viewable content. Rendering can quickly become a performance bottleneck.

Props in React

Props is a special keyword in React, which means for properties and it is used for passing data from one component to another…


Semicolons

To use them, or not to use them…

Nowadays freshers are getting confused about whether they will use semicolons or not!! Because some people decided to avoid semicolons in javascript. But a semicolon should be present after each statement, even if it could possibly be skipped. In JavaScript, though, there are cases where a line break is not interpreted as a semicolon, leaving the code vulnerable to errors.

If

When we use if condition we should make sure that have spaces in them if condition ( a <= 0) and should avoid an extra line for the curly braces.

Bad Style


This post covers some basic concepts in JavaScript. Every JavaScript programmer must know and master these.

1. understanding Scope:

A simple definition for a scope in JavaScript:

The scope is the accessibility of variables, functions, and objects in some particular part of your code during runtime. In other words, scope determines the visibility of variables and other resources in areas of your code.

As per the above definition of Scope, So, the point is limiting the visibility of variables and not having everything available everywhere in your code.

the scope is defined in the main two ways,

  • Global Scope
  • Local Scope

Amina Anika

I am a front-end developer. I love to know about new technologies.

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