Skip to content

Javascript

  1. var: Declares a variable, optionally initializing it to a value.
  2. let: Declares a block-scoped, local variable, optionally initializing it to a value.
  3. const: Declares a block-scoped, read-only named constant.
  4. function: Declares a function.
  5. return: Specifies the value to be returned by a function.
  6. if: Executes a block of code if a specified condition is true.
  7. else: Executes a block of code if the same condition is false.
  8. for: Creates a loop with a condition and increment/decrement value.
  9. while: Creates a loop that executes a block of code as long as a specified condition is true.
  10. break: Exits a loop or switch statement.
  11. continue: Skip the current iteration in a loop and continues with the next one.
  12. null: Represents the intentional absence of any object value.
  13. undefined: A top-level property whose value is undefined.
  14. isNaN: Determines whether a value is NaN or not.
  15. parseInt: Parses a string argument and returns an integer.
  16. parseFloat: Parses a string argument and returns a floating point number.
  17. isFinite: Determines whether a value is a finite, legal number.
  18. encodeURI: Encodes a Uniform Resource Identifier (URI) by replacing each instance of certain characters by one or more escape sequences representing the UTF-8 encoding of the character.
  19. decodeURI: Decodes a Uniform Resource Identifier (URI) previously created by encodeURI or by a similar routine.
  20. eval: Evaluates JavaScript code represented as a string.
  21. switch: Evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case.
  22. try: Defines a block of code to test for errors while it is being executed.
  23. catch: Defines a block of code to be executed, if an error occurs in the try block.
  24. throw: Throws a user-defined exception.
  25. finally: Defines a block of code to be executed, after try and catch, regardless of the result.
  26. typeof: Returns a string indicating the type of the unevaluated operand.
  27. instanceof: Tests whether an object has in its prototype chain the prototype property of a constructor.
  28. delete: Deletes a property from an object.
  29. in: Returns true if the specified property is in the specified object.
  30. this: Refers to the object it belongs to.

Array.prototype.push(): Adds one or more elements to the end of an array and returns the new length of the array. Array.prototype.pop(): Removes the last element from an array and returns that element. Array.prototype.shift(): Removes the first element from an array and returns that element. Array.prototype.unshift(): Adds one or more elements to the front of an array and returns the new length of the array. Array.prototype.join(): Joins all elements of an array into a string. Array.prototype.slice(): Returns a shallow copy of a portion of an array. Array.prototype.splice(): Changes the contents of an array by removing or replacing existing elements. Array.prototype.map(): Creates a new array with the results of calling a provided function on every element in the array. Array.prototype.filter(): Creates a new array with all elements that pass the test implemented by the provided function. Array.prototype.reduce(): Applies a function against an accumulator and each element in the array (from left to right) to reduce it to a single value. Array.prototype.every(): Tests whether all elements in the array pass the test implemented by the provided function. Array.prototype.some(): Tests whether at least one element in the array passes the test implemented by the provided function. Array.prototype.find(): Returns the value of the first element in the array that satisfies the provided testing function. Array.prototype.findIndex(): Returns the index of the first element in the array that satisfies the provided testing function. String.prototype.indexOf(): Returns the index within the calling String object of the first occurrence of the specified value. String.prototype.lastIndexOf(): Returns the index within the calling String object of the last occurrence of the specified value. String.prototype.includes(): Determines whether one string may be found within another string. String.prototype.startsWith(): Determines whether a string begins with the characters of a specified string. String.prototype.endsWith(): Determines whether a string ends with the characters of a specified string. String.prototype.slice(): Extracts a section of a string and returns it as a new string. String.prototype.split(): Splits a String object into an array of strings by separating the string into substrings. String.prototype.toUpperCase(): Returns the calling string value converted to uppercase. String.prototype.toLowerCase(): Returns the calling string value converted to lowercase. String.prototype.trim(): Trims whitespace from the beginning and end of the string. Math.random(): Returns a floating-point, pseudo-random number in the range 0 to less than 1. Math.floor(): Returns the largest integer less than or equal to a given number. Math.ceil(): Returns the smallest integer greater than or equal to a given number. Math.round(): Returns the value of a number rounded to the nearest integer. Date.now(): Returns the numeric value corresponding to the current time. setTimeout(): Sets a delay for executing a function.

On this page

Array.prototype.push(): Adds one or more elements to the end of an array and returns the new length of the array. Array.prototype.pop(): Removes the last element from an array and returns that element. Array.prototype.shift(): Removes the first element from an array and returns that element. Array.prototype.unshift(): Adds one or more elements to the front of an array and returns the new length of the array. Array.prototype.join(): Joins all elements of an array into a string. Array.prototype.slice(): Returns a shallow copy of a portion of an array. Array.prototype.splice(): Changes the contents of an array by removing or replacing existing elements. Array.prototype.map(): Creates a new array with the results of calling a provided function on every element in the array. Array.prototype.filter(): Creates a new array with all elements that pass the test implemented by the provided function. Array.prototype.reduce(): Applies a function against an accumulator and each element in the array (from left to right) to reduce it to a single value. Array.prototype.every(): Tests whether all elements in the array pass the test implemented by the provided function. Array.prototype.some(): Tests whether at least one element in the array passes the test implemented by the provided function. Array.prototype.find(): Returns the value of the first element in the array that satisfies the provided testing function. Array.prototype.findIndex(): Returns the index of the first element in the array that satisfies the provided testing function. String.prototype.indexOf(): Returns the index within the calling String object of the first occurrence of the specified value. String.prototype.lastIndexOf(): Returns the index within the calling String object of the last occurrence of the specified value. String.prototype.includes(): Determines whether one string may be found within another string. String.prototype.startsWith(): Determines whether a string begins with the characters of a specified string. String.prototype.endsWith(): Determines whether a string ends with the characters of a specified string. String.prototype.slice(): Extracts a section of a string and returns it as a new string. String.prototype.split(): Splits a String object into an array of strings by separating the string into substrings. String.prototype.toUpperCase(): Returns the calling string value converted to uppercase. String.prototype.toLowerCase(): Returns the calling string value converted to lowercase. String.prototype.trim(): Trims whitespace from the beginning and end of the string. Math.random(): Returns a floating-point, pseudo-random number in the range 0 to less than 1. Math.floor(): Returns the largest integer less than or equal to a given number. Math.ceil(): Returns the smallest integer greater than or equal to a given number. Math.round(): Returns the value of a number rounded to the nearest integer. Date.now(): Returns the numeric value corresponding to the current time. setTimeout(): Sets a delay for executing a function.