20 String Methods in 7 Minutes - Beau teaches JavaScript

  Рет қаралды 130,312

freeCodeCamp.org

freeCodeCamp.org

7 жыл бұрын

String methods featured in this video: charAt, charCodeAt, concat, endsWith, fromCharCode, includes, indexOf, lastIndexOf, match, repeat, replace, search, slice, split, startsWith, substr, substring, toLowerCase, toUpperCase, trim.
Code:
🔗 codepen.io/beaucarnes/pen/qRLz...
Other resources on topic:
🔗 www.w3schools.com/jsref/jsref...
Beau Carnes on Twitter: / carnesbeau
⭐JavaScript Playlists⭐
▶JavaScript Basics: • JavaScript Basics Course
▶ES6: • ES6 - Beau teaches Jav...
▶Design Patterns: • Design Patterns - Beau...
▶Data Structures and Algorithms: • Data Structures and Al...
▶Clean Code: • Clean Code - Beau teac...
-
We're busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.
Join our community at freecodecamp.com
Follow us on twitter: / freecodecamp
Like us on Facebook: / freecodecamp
Follow Quincy on Quora: www.quora.com/Quincy-Larson

Пікірлер: 80
@CameronChardukian
@CameronChardukian 5 жыл бұрын
Watching this video as a newbie Javascript developer was super insightful. A perfect crash course on possibilities of cool things you can do to modify strings in Javascript.
@smyasir0
@smyasir0 5 жыл бұрын
Grand Summary charAt - returns character at specified index, myString.charAt(1) will return SECOND letter of string myString. charCodeAt - same as charAt but returns unicode instead. concat - concatenates string1 and string2, string1.concat(string2) // string1+string2 endsWith - condition check to determine if a given string ends with a certain character or string; string1.endsWith("abc") , fromCharCode - converts unicode values to characters, it is a static method of the String object, so you type String.fromCharCode(desiredCharCode) , where String is the string object and not any arbitrary string. includes - checks whether the string includes a specified character/string.. indexOf - tells the index of a specified string or character in the input string; inputString.indexOf("Dog"). In case of TWO or more occurrences of the same string/char in the inputString, it will tell index of only the first occurrence ! lastIndexOf - same as indexOf() but returns the index of the LAST occurrence of the specified char or string in the input string. match - searches the input string for matches of the REGULAR EXPRESSION specified and returns them in an array. repeat - repeats the string a specified number of times, inputString.repeat(3) // 3 times repeat inputString ! replace - searches a string for a specific sub-string or REGULAR EXPRESSION and replaces it with the specified string. inputString.replace("end", "END") search - searches the string for a specified sub-string or REGULAR EXPRESSION and tells it's position. slice - slices or extracts a specified portion of the inputString. inputString.slice(2,4), returns the stuff from index 2 till index 3 split - splits the string, into an array of sub-strings, upon the occurrence of the character specified. e.g inputString.split(" ") will split the string EVERYTIME a space (" ") occurs in the inputString and push the character coming UP TILL the space as a new entry in the array. ( but not including the space itself ? ) startsWith - checks if a string begins with a specified character/sub-string; conditional check. substr - similar to slice, extracts a sub-string from the inputString, starting from the given initialIndex, and going up to the number of subsequentDigits, including the character at initialIndex in the count as well. inputString.substr(initialIndex, subsequentDigits) . Watch in video if it's hard to understand. substring - Ditto copy of slice, better to look at stackoverflow.com/a/2243835 for a better understanding of differences. toLowerCase - makes ALL the letters in string to lower case toUpperCase - exact opposite of toLowerCase() . trim - removes WhiteSpace from EITHER SIDE of the inputString; inputString.trim().
@webdesigner111
@webdesigner111 4 жыл бұрын
Thank you
@elilumilay9405
@elilumilay9405 4 жыл бұрын
Dude you saved me. I was doing a note and I keep replaying it to get the description. Thanks a lot!!
@joonkim9302
@joonkim9302 4 жыл бұрын
stop being lazy and f*ing spend 6minutes holy sh*t
@elilumilay9405
@elilumilay9405 4 жыл бұрын
@@joonkim9302 did someone hurt your feelings boy?
@carlosnani
@carlosnani 5 жыл бұрын
It was very very useful. Thanks a lot. I´d love 20 methods from another. :)
@ronmoki1
@ronmoki1 Жыл бұрын
THANK YOU !!! FINALLY STRAIGHT TO THE POINT VIDEO !
@AnnaMaria-or7se
@AnnaMaria-or7se 5 жыл бұрын
Excellent! Loved it.
@frogboy831
@frogboy831 Жыл бұрын
thanks so much!! i was having trouble differentiating all these.
@bitcode_
@bitcode_ 7 жыл бұрын
love these vids. thanks!
@more2learn279
@more2learn279 Жыл бұрын
Awesome. Great summary. Helpful.
@DMoots
@DMoots 6 жыл бұрын
Thanks man this was so handy!
@marimuthur9456
@marimuthur9456 2 жыл бұрын
Fabulous explanation thank you so much for sharing your knowledge to us keep posting like this....👌🏼👌🏼👌🏼👌🏼👌🏼😊🙏🏼
@pmahesh6789
@pmahesh6789 3 жыл бұрын
I like your last method of the list. So, Subscribed.
@hattorihanzo5707
@hattorihanzo5707 3 жыл бұрын
very handy and useful. Thanks, FCC
@paschalynukwuani6930
@paschalynukwuani6930 Жыл бұрын
You are awesome man. Guess what! You are also part of the reason people subscribe to this channel!
@sharikzafar3733
@sharikzafar3733 2 жыл бұрын
That's great explain by you 👨‍💻thanks a lot from🇮🇳 india.
@peristiloperis7789
@peristiloperis7789 3 жыл бұрын
Amazing video!
@sergi3629
@sergi3629 7 жыл бұрын
Great stuff.
@tproduction7761
@tproduction7761 2 жыл бұрын
Great job
@paulineberton5702
@paulineberton5702 2 жыл бұрын
Thank you very much, that's very helpful!! Your voice sounds like Sheldon Cooper's', it was like watching 'Fun With Code" ! :D
@maquindesign9158
@maquindesign9158 4 жыл бұрын
Love it.. Please do: 20 number methods, 20 array methods.
@fatemeetsluck
@fatemeetsluck 3 жыл бұрын
Great video.
@lailaabdulrahman9138
@lailaabdulrahman9138 Жыл бұрын
Thanks its very useful
@simoo7755
@simoo7755 4 жыл бұрын
Thank you!
@MrTsamish
@MrTsamish 5 жыл бұрын
Hi Sir, what is the difference between 'str.search' and 'str.indexOf'??
@kirans936
@kirans936 3 жыл бұрын
Just loved the tutorials 😍
@Dipenparmar12
@Dipenparmar12 6 жыл бұрын
Good one.....
@oufcena5092
@oufcena5092 4 жыл бұрын
var str = "freeCodeCamp is the best place to learn frontend and backend development"; str.includes("end"); //returns true str.startWith("free"); //returns true str.endwith("end"); //returns false str.match(/end/g); //returns an array str.repeat(3); //returns the same string concatenated to itself 3 times
@andriidou8023
@andriidou8023 5 жыл бұрын
very useful
@diwakarnrp2092
@diwakarnrp2092 5 жыл бұрын
Nice 👌👌👌👌👌👌 sirji
@potatoredcontentetvmito3617
@potatoredcontentetvmito3617 3 жыл бұрын
Good!
@Koyi_supremacist
@Koyi_supremacist 3 жыл бұрын
Code editor and theme pls?
@julioarruda8182
@julioarruda8182 Жыл бұрын
I think Beau lives in a different speed
@amberjones7573
@amberjones7573 5 жыл бұрын
This video is the SH*T lol. I wish all videos were this quick and to the point. Plus gave me every option I needed. THANK YOU!
@osamagamal495
@osamagamal495 4 жыл бұрын
yeah short and straightforward but actually omitting some stuff like the difference between slice and substring and many other things.
@Galejandro84
@Galejandro84 6 жыл бұрын
*Excelent video*
@KennyZzy
@KennyZzy 6 жыл бұрын
how many string methods are there? Do you have to memorise it ?
@juliankaww
@juliankaww 5 жыл бұрын
don´t need to memorise but is good to know that exists.
@tinosebata520
@tinosebata520 2 жыл бұрын
Hi I'm a new coder to java I was just wondering in an array I've seen coders use /g alot why is it used
@JD-kf2ki
@JD-kf2ki 4 жыл бұрын
Was looking for 'join'.
@aphelioschenik3162
@aphelioschenik3162 3 жыл бұрын
Is the first one usless ? Cause we can just do like this stringOne [1] == stringOne.charAt(1)
@randomdeveloper6456
@randomdeveloper6456 7 жыл бұрын
Another good short video for future references. :)
@BrendanMetcalfe
@BrendanMetcalfe 2 жыл бұрын
A lot of these are similar in Python as well
@Altoids101
@Altoids101 6 жыл бұрын
How many string methods do you people need?
@AB-vl4yb
@AB-vl4yb 7 жыл бұрын
Difference between slice and substring stackoverflow.com/questions/2243824/what-is-the-difference-between-string-slice-and-string-substring
@PavanKumar-os9xj
@PavanKumar-os9xj 2 жыл бұрын
Good
@patrickmayer9218
@patrickmayer9218 11 ай бұрын
If only js strings weren't immutable! Regardless, thanks for the video!
@satheeswaran9210
@satheeswaran9210 2 жыл бұрын
Cool
@BrendanMetcalfe
@BrendanMetcalfe 2 жыл бұрын
👍👍👍
@freddyperla7944
@freddyperla7944 2 жыл бұрын
I'm so used to char as in "CHARCOAL" not char as in "CARE"
@akugoms7736
@akugoms7736 6 жыл бұрын
whats the use of this all?
@diegofreire7827
@diegofreire7827 5 жыл бұрын
For eg. I could use these methods in Bioinformatics stuff to manipulating DNA sequences of ACTGs
@smyasir0
@smyasir0 5 жыл бұрын
any easier use ?
@foxxxof
@foxxxof 5 жыл бұрын
@@smyasir0 Maybe creating user names from first and last names. Re-formatting documents with extra spaces, or finding incorrect capitalization - or changing an acronym to be all caps within a document . Finding specific characters within data. The concatenation feature could be used in many many ways.
@gilsonviana4936
@gilsonviana4936 5 жыл бұрын
In my opinion, for beginners is far more effective to learn - how to interact with object types - using LOOPS and CONDITIONALS then to learn a dozen of prototype methods. Not saying that you DON'T need to learn it though.
@lalaithan
@lalaithan 5 жыл бұрын
This is a part of a playlist, including that topic.
@peacefuldeityspath
@peacefuldeityspath 3 жыл бұрын
I can make a password cracker in js learning this LOL
@peacefuldeityspath
@peacefuldeityspath 3 жыл бұрын
@Neutral Me • 13 years ago too late buddy
@nested9301
@nested9301 Жыл бұрын
use your code for good
@WebboTravels
@WebboTravels 7 жыл бұрын
For those wondering why 1 is r it's because the computer starts counting at 0 so f=0
@Challenge9000
@Challenge9000 5 жыл бұрын
'Care.' ...ok
@osvaldogalvez4776
@osvaldogalvez4776 Жыл бұрын
man i had to slow him down hahaha
@jeffenriquez9929
@jeffenriquez9929 3 жыл бұрын
Anyone else pronounce 'char' as /CHär/??
@juanmatapatpinoy
@juanmatapatpinoy Жыл бұрын
Maybe u can change ur title in 20 JS string methods in 6:59, not 7mins 😅lol.
@danielgarr4030
@danielgarr4030 5 жыл бұрын
i got lost at /end/g
@javadkhalilarjmandi3906
@javadkhalilarjmandi3906 Жыл бұрын
You are complicating the explanation when it is not necessary, you use big words which are just confusing and useless. You could do much better.
Functions - Beau teaches JavaScript
7:18
freeCodeCamp.org
Рет қаралды 68 М.
Trágico final :(
01:00
Juan De Dios Pantoja
Рет қаралды 32 МЛН
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Рет қаралды 4,6 МЛН
Kubernetes Tutorial for Beginners [FULL COURSE in 4 Hours]
3:36:55
TechWorld with Nana
Рет қаралды 8 МЛН
Learn JavaScript Array Reduce In 10 Minutes
10:22
Web Dev Simplified
Рет қаралды 195 М.
Objects - Beau teaches JavaScript
8:40
freeCodeCamp.org
Рет қаралды 41 М.
CSS Basics in 9 Minutes
8:42
Learndev
Рет қаралды 589
AJAX - Beau teaches JavaScript
6:14
freeCodeCamp.org
Рет қаралды 37 М.
#37 - Most Important String Methods In JavaScript
27:06
Naveen AutomationLabs
Рет қаралды 2,6 М.
Learn DOM Manipulation In 18 Minutes
18:37
Web Dev Simplified
Рет қаралды 1 МЛН
THIS keyword - Beau teaches JavaScript
8:48
freeCodeCamp.org
Рет қаралды 57 М.
Learn Regular Expressions In 20 Minutes
20:52
Web Dev Simplified
Рет қаралды 1,2 МЛН
Trágico final :(
01:00
Juan De Dios Pantoja
Рет қаралды 32 МЛН