Skip to content

A comprehensive cheat sheet for JavaScript methods across different data types. This repository provides quick references for string, array, number, object and date methods in JavaScript. Each cheat sheet includes method names, code examples, expected results, and return types, making it a handy resource for developers seeking quick guidance.

License

SamiurRahmanMukul/JavaScript-Methods-CheatSheet

Repository files navigation

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

About

A comprehensive cheat sheet for JavaScript methods across different data types. This repository provides quick references for string, array, number, object and date methods in JavaScript. Each cheat sheet includes method names, code examples, expected results, and return types, making it a handy resource for developers seeking quick guidance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published