No video

String slicing in JavaScript ✂️【3 minutes】

  Рет қаралды 22,765

Bro Code

Bro Code

Күн бұрын

Пікірлер: 24
@BroCodez
@BroCodez 2 жыл бұрын
// slice() extracts a section of a string // and returns it as a new string, // without modifying the original string let fullName = "Snoop Dogg"; let firstName; let lastName; //firstName = fullName.slice(0, 3); //lastName = fullName.slice(4); firstName = fullName.slice(0, fullName.indexOf(" ")); lastName = fullName.slice(fullName.indexOf(" ") + 1); console.log(firstName); console.log(lastName);
@joyceasante8292
@joyceasante8292 Жыл бұрын
Practicing... let fullName = "Spicy Spy"; let lastName; //firstName = fullName.slice(0,9); //lastName = fullName.slice(10); firstName = fullName.slice(0, fullName.indexOf(" ")); lastName = fullName.slice(fullName.indexOf(" ")+ 1); console.log(firstName); console.log(lastName);
@denhafiz1860
@denhafiz1860 2 жыл бұрын
Thanks bro! I really like your style of explaining things, easy to understand for me as a beginner.
@JoJo-wz4ez
@JoJo-wz4ez Жыл бұрын
The Bro we needed!
@shashikantm9135
@shashikantm9135 2 жыл бұрын
Thank you every video is practical 🤗
@hoatranminh5216
@hoatranminh5216 Жыл бұрын
Great teacher as always, my friend
@lucabinder9829
@lucabinder9829 2 жыл бұрын
That was spicy 🔥
@MrLoser-ks2xn
@MrLoser-ks2xn Жыл бұрын
Thanks!
@TheEvertonDias
@TheEvertonDias Жыл бұрын
Thanks, Bro!
@adamnusier7397
@adamnusier7397 Жыл бұрын
Thanks bro
@GPax96
@GPax96 2 жыл бұрын
thankYouBro.slice();
@jetty_19
@jetty_19 Жыл бұрын
what if the name is long? what would be the syntax?
@shadyawad5383
@shadyawad5383 Жыл бұрын
It would be the same. The length of the name doesn't matter since you would be using indexOf to set your slice values before and after the space. firstName = fullName.slice(0, fullName.indexOf(" ")); lastName = fullName.slice(fullName.indexOf(" ") + 1);
@tariqal-qassab5972
@tariqal-qassab5972 5 ай бұрын
@Jerry-oq2le
@Jerry-oq2le Жыл бұрын
Ily
@shemicajean-baptiste78
@shemicajean-baptiste78 Жыл бұрын
👏
@Alexffire4808
@Alexffire4808 8 ай бұрын
How much do you charge for tuition?
@clrkkdd12
@clrkkdd12 2 жыл бұрын
👊🏽
@anlberkearslantas3813
@anlberkearslantas3813 Жыл бұрын
SQRRRRT for the algorithm
@randallhale5529
@randallhale5529 Жыл бұрын
squirt? sus
@MohyDev
@MohyDev 2 жыл бұрын
Wubba Lubba Dub-Dub, For the algorithm!
@Spunky_Tx
@Spunky_Tx 2 ай бұрын
Fredhhrrggv ❤
@kartikchauhan3692
@kartikchauhan3692 2 жыл бұрын
random comment
Useful string methods in JavaScript 〰️【4 minutes】
4:21
Method chaining in JavaScript ⛓️【1 minute】
1:56
Bro Code
Рет қаралды 16 М.
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 25 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 991 М.
slice vs substring method | String Object In JavaScript
6:15
Code Explained
Рет қаралды 11 М.
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 525 М.
Const in JavaScript 🚫【3 minutes】
3:03
Bro Code
Рет қаралды 27 М.
indexOf and lastIndexOf methods | String Object In JavaScript
9:00
Code Explained
Рет қаралды 8 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
What are JavaScript PROMISES? 🤞
12:37
Bro Code
Рет қаралды 59 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Slice vs splice in JS
6:16
CodeVault
Рет қаралды 7 М.
Python string slicing ✂️
11:37
Bro Code
Рет қаралды 60 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,2 МЛН
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 25 МЛН