Suhail Kakar Profile picture
Nov 16, 2021 β€’ 31 tweets β€’ 8 min read β€’ Read on X
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

Feb 23, 2023
In JavaScript,

1 + "1" = 11
But,
1 - "1" = 0

Here is why ↓
β†’ We all know that 1 + 1 = 2, and 1-1=0 but how does the JavaScript Engine compute give the first answer 11 and the second answer 0.
β†’ In computer programming, concatenation is the operation of joining two strings together. The term"concatenation" literally means to merge two things together.
Read 6 tweets
Jan 1, 2023
7 Front-end Web Development Projects You Can Build to Become Frontend Master and Add to Your Portfolio Right Away:

🧡 ↓
1/ Blog Website

Tech Stack:
β€’ Next.js
β€’ React.js
β€’ Styled Components
β€’ MDX

What you will learn:
After creating a blog from scratch, you will learn about styled-components, routing in Next JS, implementing MDX, and using dynamic routes.
2/ Weather App

What you will learn:
After creating a weather app, you will learn about fetching data from API, posting data to API, mapping data, and creating dynamic pages.

Tech Stack:
β€’ React.js
β€’ Tailwind CSS
β€’ Axios
Read 9 tweets
Dec 29, 2022
Land a remote Web3 job in 2023 with these websites:
1/ Cryptocurrency Jobs

Cryptocurrency Jobs is a job board that lists positions in the blockchain and cryptocurrency industry.

It features openings at various Web3 companies and startups

β†’ cryptocurrencyjobs.co
2/ Crypto Jobs List

CryptoJobsList is a website that features a large list of cryptocurrency, Web3, and blockchain job openings.

With over 3148 listings, it's a great resource for finding employment opportunities in the Web3 industry.

β†’ cryptojobslist.com
Read 7 tweets
Dec 10, 2022
13 Projects you can build to become a web3 and blockchain master - including tech stack

↓
Learning to code can be difficult and confusing, especially if you aren't sure where to start. The greatest approach to improving your Web3 skills is to use them to create projects.
In this thread, I will be sharing 13 projects that you can build to increase your Web3 and Blockchain skills, whether you're a novice or returning to coding.
Read 16 tweets
Dec 7, 2022
Web3 is the future of the internet.

And there are hundreds of thousands of technical and non-tech career opportunities

Here's how to get a career in Web3 as a developer:
Start with Web3 Lingo!

Web3, Blockchain, and NFTs can be confusing. Here are 30+ terms that can help YOU understand them.

You don't need to memorize all the 30 terms, you need to have an idea and understand them.

Learn Fundamentals

Before getting into Web3 and Blockchain development, It is better to have good knowledge about the basics and fundamentals of computer science and blockchain.

Here is a video from Coding Tech that explains blockchain technology

Read 15 tweets
Dec 6, 2022
Ethereum processes over 1,00,000 transactions per day making it the most popular Blockchain.

Here is a complete guide to Ethereum ↓

- What is Ethereum?
- Why do many Web3 applications use it?
- How does it work (its architecture)
- How secure it is?

A thread 🧡
Let's start with Ethereum

Ethereum is a decentralized blockchain that runs smart contract applications. Smart contracts are codes that are programmed without any possibility of downtime, censorship, fraud, or third-party interference.

1/9
Many Web3 developers have chosen to build on Ethereum because of its inherent decentralization. This means anyone can use the service and permission is not required.

No one can block nor deny you access of this blockchain.

2/9
Read 10 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

Don't want to be a Premium member but still want to support us?

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

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(