SamiurRahmanMukul / JavaScript-Methods-CheatSheet

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.

Home Page:https://github.com/SamiurRahmanMukul/JavaScript-Methods-CheatSheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

https://github.com/SamiurRahmanMukul/JavaScript-Methods-CheatSheet

License:Apache License 2.0