Ten important JavaScript Topics

samiul sheikh
3 min readMay 5, 2021

Today I discuss about Ten JavaScript basic topics. Hopefully that helps all JavaScript Developers.

01. Variable (var, let, const)

For declare a variable we use var, let and const. var is not block level but let and const is block level variable. If we need to update a variable in later start the variable name using let. Other hand when we start a variable name using const that never be changed.

02. Opertors

In JavaScript some numerical operator like +, -, *, /, %, =, ++, — etc.

03. Object

In JavaScript access object property using (.) method or index method.

04. String Slice method

Basically, slice method is using for divide a string to new piece of string and don’t change the original string. Let’s see with an example.

05. String toLocaleLowerCase and toLocaleUpperCase method

toLocaleLowerCase method convert string into lowercase and toLocaleUpperCase method convert string into uppercase.

06. NaN and parseInt method

NaN means Not A Number. When we want to convert a string into number and if there is no number type then return NaN.

07. toFixed method

Using toFixed method we can return long number into short number with specific digit. Below the example we convert four digits into two digits.

08. Array Push method

Using array push method, we can add one or more elements in existing array. Below example we added new friend nadim into our friends array.

Using push method with for loop

09. Array pop method

Using array push method, we can remove last element from existing array. Below example we remove last element yellow from flowers array.

10. Array Map method

Map method used to create new array using all elements from existing array. below example using map method we multiply all elements by 2.

Thank you…

--

--