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.
β 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.
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.
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.
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
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