10 JavaScript topics everyone must know it.

Mahfuz Alam
4 min readMay 5, 2021

Today, I am going to talk about 10 JavaScript topics must know that better to learn JavaScript. I am excited. I think you are also excited. So, let’s start.

|Overall JavaScript

JavaScript is nowadays the most popular programming language all over the world. But if we look back to a couple of years, JavaScript was only used for Dom manipulation, but now the current world has been taking modern JavaScript as a weapon for developing an incredible number of higher-profile applications.

|Number

Number represents integer and floating numbers (decimals and exponentials)

For Example:

| isNaN()

NaN main that “Not A Number”. isNaN() method used in javaScript whether a value is an illegal number. This function returns a true value if it is NaN otherwise if it returns a false value.

For Example:

See that value parses is not a number output is true but the value parses is number output is false

| ParseFloat()

ParseFloat() method parses a string argument and converts it into a floating point number. It returns NaN, if the first character of given value cannot be converted to a number(Not-a-Number).

For Example:

See That a, b, c, d parses string argument only parses number but not be parsed character type value.

| ParseInt()

ParseInt() method parses a string argument and converts it into an integer value. With string argument, we can also provide radix argument to specify the type of numeral system to be used.

For Example:

See That x, y, z, w parses string argument only parses integer number but not be parsed character type value.

| Math.floor()

Math floor() method decreases the given number up to the closest integer value and returns it. If the given number is already an integer, the floor() method returns it directly.

Note: Math.floor(null) return 0, not a NaN.

For Example:

| Math.sqrt()

Math Sqrt() method returns the square root of a number. If the provided number is negative, it returns NaN.

For Example:

| Math.round()

Math round() method rounds up the given number up to the closest integer value and returns it. If the given number is already an integer, the round() method returns it directly.

For Example:

| Concat() Array

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

For Example:

|Filter() Array

Filter() method creates a new array with all elements that pass the test implemented by the provided function.

|forEach() Array

The forEach method is also used to loop through arrays, but it uses a function differently than the classic “for loop”.

The forEach method passes a callback function for each element of an array together with the following parameters:

  • Current Value (required) — The value of the current array element
  • Index (optional) — The current element’s index number
  • Array (optional) — The array object to which the current element belongs

For example:

|Slice()

Slice method returns a new array containing a portion of the array on which it is implemented. The original remains unchanged.

For Example:

published By:Mahfuz Alam

--

--

Mahfuz Alam

I am an enthusiastic JavaScript developer with knowing some framework for the frontend and the backend.