10 JavaScript concepts that every JavaScript Beginner Programmer must know

#CONCAT

  1. The .concat() method is using for adding multiple strings smoothly
  2. The syntax for the .concat is string1.concat(string2 [, …stringN])
  3. Here (string2 [, …stringN]) is a parameter which is concatenate to strings1
Code example of .concat( ) method

#SPLIT

  1. The split() method is using for find exact thing which we search to find
  2. Syntax for the split() method is string.split([separator[, limit]])
  3. The separator can be a simple string or it can be a regular expression
  4. We can find special character using [limit] array
  5. This method can be use both in strings and array method
Code example of split( ) method

#SLICE

  1. The slice() method is using for delete something from the exist string and other things from next
  2. Syntax for slice() methos is string.slice(beginIndex[, endIndex])
  3. Suppose we have a string and if we use string.slice(3) on that string thats mean we are deleting string from 0–2 index and will return new string from 3 index to next
Code example of slice( ) method
  1. The toUpperCase() method is using for capitalize the word or sentences
  2. Syntax of toUpperCase() method is string.toUpperCase()
Code example of toUpperCase( ) method

#Math.ceil( )

  1. The Math.ceil( ) function is using for round the floating number up to next larget number
  2. Syntax for the Math.ceil( ) function is Math.ceil(x)
  3. If the number is an integer then this method will not change the integer number
Code example of Math.ceil( ) function

#Math.floor( )

1.The Math.floor( ) function is using for returns the largest integer less than or equal to a given number

2.Syntax for the Math.floor( ) method is Math.floor(x)

3.If the number is a negative then number will change into largest negative number from the given number

Code example of Math.floor( ) function

#PUSH

  1. The push( ) method is using for adds one or more elements to the end of an array
  2. Syntax of push( ) method is array.push([element1[, …[, elementN]]])
  3. It will return new length of an array
Code example of push( ) method

#POP

  1. The pop( ) method is using for remove one or more elements to the start of an array
  2. Syntax of push( ) method is arrayName.pop()
  3. It will return new length of an array
code example of pop( ) method

#SHIFT

  1. The shift( ) method is using for delete first item from the array
  2. Syntax for shift( ) method is array.shift( )
Code example of shift( ) method

#UNSHIFT

1.The unshift( ) method is using for add one or more item into first position of an array

2.Syntax for unshift( ) is array.unshift(element1[, …[, elementN]])

Code example of unshift( ) method

#ROUND

  1. The Math.round( ) method is using for convert floating number into integer number
  2. If the floating number containg .5 after float then it convert to higher number of a giver number
  3. Syntax of Math.round( ) is Math.round(x)
Code example of Math.round( ) method

--

--

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