DEV Community

Kaviya R
Kaviya R

Posted on

Functions in Java Script

getElementById():
It is one of the most common was to select a single element in HTML DOM.
getElementByClassName():
Its used to select the document that have the specified class name(s)
getElementByTagName():
It returns an HTML collection of all element in the document that have the specific tag name.
QuerySelector:
It returns the first element within the document that matches the specified css selector.
CreateElement:
Its a method of the document object that create a new element node with the specified tag name.
PraseInt:
It parses the string element element and returns the integer
praseFloat:
This function parses a string and returns a floating-point number.
bind():
Like to putting the sticky note on the function that remember this specific thing.
push():
Adds something to the end of the list.
Pop:
Removes last thing from the list.
Math():
It act like toolbox inside the math tools inside
Math.abs():
Makes a number positive
getRootNode():
Finds the very top of HTML tree on a webpage
getSolution():
Its is used to solve a specific problem
console.error():
prints error message to the console.
sort():
puts alist in order
shift():
Removes the first thing from a list(array)
unshift():
Adds something to the beginning of a list.
addEvenListener():
Listens for something to happen on a webpage and then does something
eval():
Runs code that is inside a string.
escape():
Encodes a string for safe travel on the internet
sum():
Adds number together
document.right():
writes something directly onto the webpage.
length:
It tells you how many things are in the list

Top comments (0)