just by providing an index number. It starts counting from 0.
Interestingly it also counts white spaces.
If the value provided does not exist in the string, it returns “an empty string”.
In this method we can check, whether the existence of the provided string is
there in the string or not, returning true or false. As this method is case sensitive one must
be sure of his/her implementation of this method.
This method works like a trimmer, when used, it removes all the white spaces from both ends.
Trim does not affect the value of the string itself.
This function converts an argument to a number from a string(if needed) and returns a floating-point number.
It is a function property of the global object. If there are any unexpected* characters it will return NaN.
This method can also parse and return infinity.
Unexpected characters eg: [ + — and even an extra decimal point].
This function parses a string and returns a number. It is discouraged to use this method when there is
a very large or very small number instead of using Math.floor().
If the number is like 7.85e23 (7.85 * 10 to the power 23) it will return unexpected results.
This function will round up the number and return its next largest integer. If NaN is given as a value it returns 0, not a NaN error.
Because ceil() is a static method of Math, you always use it as Math.ceil(), rather than as a method of a Math object you created (Math is not a constructor).
it returns a random number that can be anywhere between 0 and 1. This process works fine even if you set its max and min value in it, as an example, you can generate a four-digit number.
The map() method creates a new array populated with the results of calling a provided function on every element in the calling array.
This method reverses an array, for example, the first element becomes the last and the last becomes the first.
This method takes three-parameter, first for the targeted index number, second for how many items you want to delete/update or replace and the third parameter is what you want to insert.