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