JavaScript:function
code:js
function name(parameter1, parameter2, parameter3) {
// what the function does
}
Outputting Data
alert()
Output data in an alert box in the browser window
confirm()
Opens up a yes/no dialog and returns true/false depending on user click
console.log()
Writes information to the browser console, good for debugging purposes
document.write()
Write directly to the HTML document
prompt()
Creates an dialogue for user input
Global Functions
decodeURI()
Decodes a Uniform Resource Identifier (URI) created by encodeURI or similar
decodeURIComponent()
Decodes a URI component
encodeURI()
Encodes a URI into UTF-8
encodeURIComponent()
Same but for URI components
eval()
Evaluates JavaScript code represented as a string
isFinite()
Determines whether a passed value is a finite number
isNaN()
Determines whether a value is NaN or not
Number()
Returns a number converted from its argument
parseFloat()
Parses an argument and returns a floating point number
parseInt()
Parses its argument and returns an integer
JavaScript-term.icon
JavaScript-syntax.icon
https://img.shields.io/badge/JavaScript-function-F7DF1E.svg?logo=javascript&style=for-the-badge