Overview of Fundamental JavaScript

Abu Saleh Faysal
2 min readMay 5, 2021

We can store different types of values in JavaScript variables. They are

  1. Number
  2. String
  3. Function
  4. Object
  5. Symbol

Between these types, Symbol has been introduced in ES6.

Firstly, we are going to talk about Numbers. There are two built-in numeric types. They are Number and BigInt. We use the number for doing mathematical operations in javascript. Even we can convert a string to a number by using the parseInt() method.

Secondly, we are going to discuss string. The string is used hugely in almost every high-level programming language. For example, a name to a sentence, we use string or even taking input. We can manipulate strings by various javascript methods. Such as, by using toArray() we can convert a string to an array.

There is a very popular problem that can be solved easily by javascript which is reverse a string. Like, if you input a string “abusalehfaysal”. It will return the string like this, “lasyafhelasuba”. We can solve the problem with three easy javascript methods.

For solving this problem, we have to convert the string into an array by using the split() method. then we will convert the array by reverse() method and finally, we will join the array and convert it again into a string by joining () method.

JavaScript has some confusing things as well. Such as closures. We will talk about it some other day.

In the basic javascript, we use one thing which is very common in problem solving and development as well. Yes, you guessed it correctly, it is Array. There are many ways to manipulate an array and to work with it.

If we start with a very basic, we will know about for loop to iterate the array elements.
The same iteration can be done in multiple ways such as using for each loop or map method.

That is enough to make a kick start with JavaScript. We will talk more on some other day.

--

--

Abu Saleh Faysal

Software Engineer at Onethread | Front-End Developer | Blockchain Enthusiast | JavaScript | TypeScript | React | Redux