Categories

Java

JavaScript

Java is an OOPS programming language.

JavaScript is an OOPS scripting language.

It creates applications that run in a virtual machine or browser.

The code is run on a browser only.

Java code needs to be compiled.

JavaScript code are all in the form of text.

Built-in Method

Values

CharAt()

It returns the character at the specified index.

Concat()

It joins two or more strings.

forEach()

It calls a function for each element in the array.

indexOf()

It returns the index within the calling String object of the first occurrence of the specified value.

length()

It returns the length of the string.

pop()

It removes the last element from an array and returns that element.

push()

It adds one or more elements to the end of an array and returns the new length of the array.

reverse()

It reverses the order of the elements of an array.