1. What is JavaScript truthy and falsely value??
  • Any number is negative or positive value , any string, array or object is truthy value. But 0 (zero), empty string (“”), variable value is null, NaN, false and declare variable but not assign value are return falsy value.


let price = 60;
or let price = "0";
or let price = " ";
if (price){
}else {
//output : true
let price = 0;
or, let price = "";
or, let price = null;
or, let price;
or, let price = NaN;
or, let price =…

Data Types, Error handling , ES6

Data Types :

There are different types of data in JavaScript. They are-

  • Number,
  • String,
  • Boolean,
  • Undefined,
  • Null,
  • Objects,
  • Function

Example :

typeof(2) //Number
typeof('1') //string
typeof (true) //boolean
typeof (undefined) //undefined
typeof(null) //null
typeof({}) //objects
typeof(index => index * value) //function

Error Handling :

Every programmer face error to his programming code. That is every day routing. Running code without error is a fantasy for all programmer . But there is a way to handle error in this code. For this to use catch in code.

Example :

try {
//programming code..
//error handle

First try{…} code is executed, if catch error in…

String, Number, Math, Array

Javascript Blogs
Javascript Blogs
  1. charAt()

charAt() is a method. It is a find out a character at a specific index in a string and access an individual character in a string. The index of the first character is 0, the second character is 1, and so on.

Syntax : “string”.charAt(index)

// expected output: “index number character”

Example :

return "moshiur".chartAt(1) 
//returns "o"


The concat() method is used to join two or more strings. This method does not change the existing strings, but returns a new string.

Syntax : “string1”.concat(‘ ’, string2)

// expected output: “string1 string2”

Example :

let firstName = "Moshiur";
let lastName…

MD Moshiur Rahman

Web Developer

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