JavaScript has many built-in functions that are available to use in your code. These functions are part of the JavaScript standard library and provide a wide range of useful utilities for working with numbers, strings, arrays, objects, and other data types.
Here are a few examples of built-in JavaScript functions:
Math.abs()
: This function returns the absolute value of a number. For example:Math.abs(-5)
returns5
.Math.max()
: This function returns the maximum value of a list of numbers. For example:Math.max(1, 2, 3, 4, 5)
returns5
.Math.min()
: This function returns the minimum value of a list of numbers. For example:Math.min(1, 2, 3, 4, 5)
returns1
.String.prototype.toUpperCase()
: This function converts a string to uppercase. For example:"hello".toUpperCase()
returns"HELLO"
.String.prototype.toLowerCase()
: This function converts a string to lowercase. For example:"HELLO".toLowerCase()
returns"hello"
.Array.prototype.push()
: This function adds one or more elements to the end of an array. For example:[1, 2, 3].push(4, 5)
returns[1, 2, 3, 4, 5]
.Array.prototype.pop()
: This function removes the last element from an array and returns it. For example:[1, 2, 3].pop()
returns3
.
These are just a few examples of the many built-in functions that are available in JavaScript. You can find a complete list of these functions in the JavaScript documentation.
Here is a link to the JavaScript documentation on MDN Web Docs:
https://developer.mozilla.org/en-US/docs/Web/JavaScript
You can use this link to access the documentation and browse the available functions.
I hope this helps! Let me know if you have any other questions.