Core Concept of Javascript

Rasel Hossain
3 min readMay 5, 2021

What is JavaScript :

javascript is a scripting or programming language that allows you to implement complex features on web pages. With the help of javascript, you can be displaying timely content updates, control multimedia, animate images, manipulate HTML, CSS, and more things you can do.

String in Javascript:

Javascript String stores a series of characters like “Rasel Official”.

If you store any characters in “, ‘’, or `` that is called String.

Here is some Javascript String Properties :

  1. charAt() => return the character at the specified index position
  2. charCodeAt() => returns the Unicode of the character at specified index
  3. concat() => join tow or more string ,and returns a new joined strings
  4. endsWith() => checks whether a string ends with a specified string
  5. includes() checks whether a string contains the specified string
  6. indexOf() => returns the position of the first found occurrence of a specified value in a string

Number in JavaScript :

in Javascript Number is a Primitive data type:
here some numbers like 1468(integer),3.45(Float) but in javascript integer and float all these numbers are just numbers.

we can declare a number with the help of the JavaScript Number constructor Like “Number(45)”.

We can also convert a string to a number with this Number constructor.

Here are Some Number Properties :

  1. Number.parseFloat(5634) => if you want to convert an integer number to a floating number then you can use this number property.
  2. Number.parseInt(45.56456) => if you want to convert a floating number to an integer number then you can use the method easily.
  3. if you want to see how many values javascript can store => console.log(Number.MAX_VALUE)
  4. At the same time, you can check what is the lowest number javascript can store.
  5. if you want to add a number with a string it returns NaN (Not a Number)

Math in JavaScript :

Javascript math object allows you to perform mathematical tasks on numbers. The syntax for any Math property is Math. property.

Here is some Math Property :

  1. Math.E => returns Euler’s number
  2. Math.PI => returns PI value
  3. Math.abs(-64564) =>returns positive value
  4. Math.floor(55.54) => returns 55
  5. Math.ceil(55.45) => returns 56
  6. Math.round(5.64) => returns 6
  7. Math.max(5,6,8,0,3) => returns maximum value
  8. Math.min(5,6,8,0,3) => retuns minmum value
  9. Math.sqrt(36) => return 6
  10. Math.pow(5,2) => return the power of 5

Javascript Array :

Javascript arrays are used to store multiple values in a single variable;

If You have a list of items and you want to store all this value in a single variable then you can use an array.

In Javascript Array looks like this :

const array =[52,6,4,apple,orange]

in this array, all items have a unique number that’s call index.

you can access array value like this.

array[0]

array[1]

array[2]

Here is some Javascript Array Method :

  1. join() => Jon method converting an array to string it behaves just like toString().
  2. pop() => pop method removes the last element from an array
  3. push() => push method adds a new element to an array at the end.
  4. shift() => shift method remove the first element of an array
  5. unShift() => unshift() method add an element at hthe begining.
  6. length => length property provide how many array element have an array
  7. delete => Javascript arrays are objected, an element can be deleted by using the javascript delete operator
  8. splice() => splice method can be used to add,deleteitem to an array
  9. concat() => concat method create a new array by marging tow arrays
  10. slice() => slice method slice out a piece of an array into a new array

--

--