JavaScript Precarious Concept!
Expectation you appreciate this article! let’s get started!😎
Do you know?
JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object orientation, and first-class functions.🏅
Today I am share some Javascript Precarious Concept!
let’s get started!
1. toUpperCase()
toUpperCase()
is a Javascript String method. this method is returns calling value converted to toLowerCase() to toUpperCae()
Syntax
YourString.toUpperCase()
Code Example
Note: The toUpperCase() method does not change the original strings.✔️
2.concat()
concat()
the method is used to join two or more strings and returns a new string.🔥
Syntax
YourString.concat(string1, string2,..)
Code Example
Note: This method does not change the existing strings.✔️
3.charAt()
charAt() method returns the character at the specified index in a string.
Remind: the index of the first character is 0
Syntax
Yourstring.charAt(indexNumber)
Code example
4.parseInt()
5.pop()
pop() is a array method.its work on array. this method removes the last element of an array and returns that element.
Syntax
YourArray.pop()
Code example
Note: pop() method changes the length of an array and you can not remove an item at one time.
6.push()
The push() method adds new items to the end of an array.
Syntax
YourArray.push(name1, name2, …, nameX)
Code example
Note: The new items (in my case name) will be added at the end of the array.
7.shift()
shift()
method .this method removes the first item of an array.
Syntax
YourArray.shift()
Code example
Note: shift() method will change your original array.
8.unshift()
this (unshift() ) method added new items to the beginning of an array.
Syntax
YourArray.unshift(name1, name2, …, nameX)
Code example
9.sqrt()
sqrt() method returns the square root of a number.
Syntax
Math.sqrt(YourValue)
Code example
10.find()
find()
method. This method returns the value of the first element in the array that in your condition…
Syntax
YourArray.find(function(currentValue, index, arr),thisValue)
Code example
Note: If no values satisfy the testing function, undefined
is returned.😥