Typescript learn for beginner

1. What is Typescript?

  • TypeScript is super set of JavaScript. This is an open source language which builds on JavaScript. One of the world most used tools, by adding static type definitions.

2. How to work TypeScript?

  • TypeScript work for value type. But this type check missing JavaScript. Declare and declaration value var or let keyword variable that type, after then any other value not reassign other type in this variable. Because TypeScript guess this type from declaration.
1. let president = "Abdul Hamid";president = 80 //not to reassign number type this is show error
console.log(president)//expect output = Abdul Hamid
president =…

  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-

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.

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

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

String, Number, Math, Array

Javascript Blogs
Javascript Blogs
  1. 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 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