The sort() method arranges the items in an array in order. By default, it sorts items alphabetically if they are strings or numerically if they are numbers. For example, if you have let numbers = [3, 1, 4, 2]; and you use numbers.sort();, it will become [1, 2, 3, 4]. If you sort strings like ['banana', 'apple', 'cherry'], they will be arranged in alphabetical order. This method helps organize your data.
When you use sort(), JavaScript looks at the ASCII values of characters to decide their order. ASCII is a table that assigns numbers to letters and symbols. For instance, 'A' has a lower ASCII value than 'a', so 'A' comes before 'a' when sorted. This affects how string sorting works, so you might get different results for uppercase and lowercase letters.
The reverse() method flips the order of the items in an array. The first item becomes the last, and the last item becomes the first. For example, if you have let numbers = [1, 2, 3]; and use numbers.reverse();, it will change to [3, 2, 1]. This method is useful when you want to reverse the order of your items.
The includes() method checks if a specific item is in an array. It returns true if the item is found, and false if it is not. For example, if you have let fruits = ['apple', 'banana', 'cherry']; and use fruits.includes('banana');, it will return true because 'banana' is in the array. If you check for an item not in the array, like fruits.includes('orange');, it will return false.
🔴 Next Video :
Tutor Instagram Profile
Ask Your Doubts Here :
For Source File ( Github ) :
🕘Timestamps:
00:11 - Overview
00:42 - sort() method
02:30 - ASCII Table for Sort methods
06:45 - reverse() method
07:20 - includes() method
08:25 - join() method
10:38 - toString() method
120 Days Developer Challanger ( Fill This Form )
Feel Free to Reach US Anytime
Feel Free to Reach US Anytime
Mobile Number
------------------
Nithya : 9150014169
Karthika : 9043337682
Whatsapp
--------------
Nithya :
Karthika :
▬▬▬▬▬▬ Connect with us 👋 ▬▬▬▬▬▬
Facebook :
Instagram :
Twitter :
Sharechat :
Moj :
Whatsapp :
Website : www.uniqjobs.co.in
Mail us : info@uniqjobs.co.in
©️ Uniqtechnologies
Thank you for watching! We hope you found today’s video on [ Array Methods - sort, reverse, includes, join & toString ] insightful and informative. If you enjoyed this content, please give it a thumbs up and subscribe to our channel for more educational videos every week!
🔔 Don’t forget to hit the bell icon so you’ll be notified when we upload new content.
#sortmethodinjs #includesmethodinjs #reversemethodinjs #joinmethodinjs #tostringmethodinjs #Javascriptfullcourse #Reactjsseriesintamil #javascriptinterviewquestions #datatypesoverview #reactjsfullcourse #reactjsproject #reactjsforbeginners
javascript interview questions tamil,
javascript tutorial for beginners in tamil,
js full course in tamil,
javascript for web development full course,
react js full course in tamil,
react tutorial for beginners in tamil,
Overview of Array Methods,
Overview of sort,
Overview of reverse,
Overview of includes,
sort() method in js,
ASCII Table for Sort methods in js,
reverse() method in js,
includes() method in js,
join() method in js,
toString() method in js,
js roadmap,javascript guide,
become a javascript developer,
javascript coder,
how to become javascript engineer,
how to become javascript coder,
how to become javascript programmer,
how to become a javascript developer,
roadmap for javascript developer,
javascript roadmap 2024,
javascript for beginners,
javascript tutorial,
javascript roadmap for beginners,
javascript tutorial for beginners in tamil,
javascript in tamil tutorial,
javascript in tamil,
javascript functions in tamil,
anonymous function in javascript tamil,
web development full course in tamil,
front end developer course in tamil,
website development tamil,
how to create a website in tamil,
js tamil,
js in tamil,
learn javascript in tamil,
js full course in tamil,
tamil web developer,
js tutorial in tamil,
javascript interview questions tamil,
javascript tutorial for beginners in tamil,
js full course in tamil,
javascript for web development full course,
react js full course in tamil
react tutorial for beginners in tamil,