Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 3.91 KB

README.md

File metadata and controls

79 lines (59 loc) · 3.91 KB

Facebook Instagram Twitter LinkedIn Github

CheatSheet Banner

JavaScript Fundamentals

JavaScript Methods CheatSheet

Strings

  • charAt(index): Returns the character at the specified index.
  • concat(...strings): Combines two or more strings.
  • toUpperCase(): Converts a string to uppercase.
  • toLowerCase(): Converts a string to lowercase.
  • trim(): Removes whitespace from both ends of a string.
  • Learn more 🚀

Arrays

  • push(...elements): Adds one or more elements to the end of an array.
  • pop(): Removes the last element from an array.
  • join(separator): Joins all elements of an array into a string.
  • slice(start, end): Extracts a portion of an array.
  • Learn more 🚀

Numbers

  • toFixed(digits): Formats a number using fixed-point notation.
  • toPrecision(precision): Formats a number to a specified precision.
  • parseInt(string, radix): Parses a string and returns an integer.
  • Learn more 🚀

Objects

  • keys(): Returns an array of a given object's property names.
  • values(): Returns an array of a given object's property values.
  • hasOwnProperty(prop): Returns a boolean indicating whether the object has the specified property.
  • Learn more 🚀

Dates

  • getDate(): Returns the day of the month.
  • getMonth(): Returns the month (0-11).
  • getFullYear(): Returns the year.
  • toLocaleDateString(): Returns a string representing the date.
  • Learn more 🚀

HAPPY CODING 😄 & I 💖 PROGRAMMING