25+ JavaScript Methods Explained 🀯

- Strings
- Objects
- Numbers
- Arrays

A mega-thread 🧡
πŸ’  String

A JavaScript string stores a series of characters or a string is a collection of characters. A string can be any text inside double or single quotes.

String Methods πŸ‘‡
βœ… toUpperCase()

The toUpperCase method is used to convert a string to upper case.
βœ… toLowerCase()

The to Lowercase is used to convert a string to lower case.
βœ… slice()

This method is used to return the sliced part of a string, it takes one or two arguments that indicate the initial and end of the slice. The arguments can also be negative.
βœ… substr()

This method is similar to slice, however, the second parameter indicates the length of the part that should be extracted.
βœ… replace()

The replace method is used to replace a part of a string with another string. This method is case-sensitive.
βœ… concat()

This method is used to concatenate two or more strings.
βœ… trim()

This method is used to remove the spaces from both sides of the string.
βœ… charCodeAt

The charCodeAt returns the unicode of the character at a specified index in a string.
βœ… charAt()

This method returns the character of a specific index in a string.
βœ… padStart

This method is used to add padding at the starting of a string.
βœ… padEnd

It adds padding at the end of the string.
βœ… length

This method is used to return the length of a string.
πŸ’  Objects

The Object is the JavaScript data type. It is used to store various keyed collections and each key can have a value.

Object Methods πŸ‘‡
βœ… keys()

This method returns the keys of an object.
βœ… values()

This method returns the values of an object.
βœ… create()

This method is used to create a new object from the existing object.
βœ… freeze()

The Object.freeze() method freezes an object. This method will allow an object to be changed, freezing an object prevents changing, for example, adding new properties to it, removing existing properties from it.
βœ… assign()

This method is used to copy the properties of one object to another object.
πŸ’  Numbers

The number is the numeric data type of Javascript that stores normal integer, floating-point values.

Numbers methods πŸ‘‡
βœ… toFixed()

This method writes the number with a specified number of decimals and returns its value as a string.
βœ… parseFloat()

This method converts the function argument to a string first and returns a floating-point number.
βœ…Number()

This method is used to convert the value of other data types to numbers.
βœ… parseInt()

This method converts the function argument to a string first and returns an integer.
πŸ’  Array

Array is a single variable that store a list of values and each element is specified by a single index.

Array Methods πŸ‘‡
βœ… pop()

The pop() method removes the last element of an array.
βœ… shift()

The shift() method removes the first element from an array.
βœ… push()

The push() method adds one or more elements to the end of an array.
βœ… length

The length returns the number of elements in an array.
That is it :D

If you found this thread useful, consider:

βœ… Following me @SuhailKakar for more content like this
πŸ”„ Retweeting the first tweet.

Thanks for your support πŸ™Œ

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Suhail Kakar

Suhail Kakar Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @SuhailKakar

16 Nov
Remove all console.log() from your project in less than a minute ✨

A short thread 🧡
console.log() is a debugging tool that can assist you to figure out what your code is doing. You may follow along as your code executes by displaying a message that contains either descriptive text that tells you what's going on or the values of certain variables.
Removing all console.log() from your project before production can be very difficult, Here is how to remove all console.log() from your project in less than a minute.
Read 7 tweets
13 Nov
πŸ’‘ Top free programming e-books & resources

πŸ“š Turn your ebook shelf into a repository of valuable knowledge without spending a penny.

A Mega Thread 🧡
HTML and CSS {1/2}
@shayhowe's Learn to Code HTML & CSS is a straightforward guide with different learning curves, making them suitable for people looking to learn the basics, or expand their skill set with some advanced techniques.

learn.shayhowe.com/html-css/
HTML and CSS {2/2}

The @Google HTML/CSS Style Guide is a great place to learn more about best practices. The guide contains a myriad of rules governing HTML and CSS style, formatting, meta, and more.

google.github.io/styleguide/htm…
Read 21 tweets
27 Oct
25 Useful Websites For Developers, That You Probably Didn’t Know πŸš€

πŸ”₯ A Mega Thread πŸ‘‡
pastebin.com lets you share snippets of code online, without worrying about HTML code tagging along.
namechk.com lets you pop in a username, and it will search hundreds of social media sites, and domain names, to see what’s available.
Read 26 tweets
20 Oct
An Ultimate Guide to Git and Github πŸš€

Thread 🧡
#opensource
πŸ’  Introduction

Git is a source code management technology used by DevOps. It is a free and open-source version control system that is used to efficiently manage small to extremely big projects.
Git is a version control system. Version control is a file manager that maintains track of changes to your projects over time and keeps a complete history of whatever you're working on. It allows many devs around the globe to work together on the same project at the same time
Read 19 tweets
20 Oct
Googling is a must-have skill for developers. πŸš€

Here are tips on how to use Google like an expert. πŸ‘‡

A thread 🧡
Google is such a dominant force in the search engine industry that it is the default search engine for Android smartphones and web browsers such as Chrome.
To put it frankly, Google has become one of the most widely utilized online resources for discovering everything from random facts and music videos to products and services. The sophisticated Google search methods and tips listed below can help you narrow your search results.
Read 9 tweets
20 Oct
An Ultimate Guide to @Docker 🐳

Thread 🧡
{1/11}

πŸ’  What is Docker

Docker is a container management service. Docker's entire purpose is to make it simple for developers to create apps, ship them into containers, and then deploy them wherever they want. Now let's discuss what are containers.
{2/11}

Containers are a solution to the challenge of moving software from one computing environment to another and having it operate consistently. This might be from a developer's laptop to a test environment, or from a real data center computer to a VM in a private/public cloud
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Thank you for your support!

Follow Us on Twitter!

:(