Learn JavaScript STRING SLICING in 8 minutes! ✂️
ฝัง
- เผยแพร่เมื่อ 27 ต.ค. 2023
- // string slicing = creating a substring
// from a portion of another string
// string.slice(start, end)
// ----------- EXAMPLE 1 -----------
const fullName = "Bro Code";
let firstName = fullName.slice(0, 3);
let lastName = fullName.slice(4, 8);
console.log(firstName);
console.log(lastName);
// ----------- EXAMPLE 2 -----------
const email = "Bro1@gmail.com";
let username = email.slice(0, email.indexOf("@"));
let extension = email.slice(email.indexOf("@") + 1);
console.log(username);
console.log(extension);
// string slicing = creating a substring
// from a portion of another string
// string.slice(start, end)
// ------------ EXAMPLE 1 ------------
const fullName = "Bro Code";
let firstName = fullName.slice(0, 3);
let lastName = fullName.slice(4, 8);
console.log(firstName);
console.log(lastName);
// ------------ EXAMPLE 2 ------------
const email = "Bro1@gmail.com";
let username = email.slice(0, email.indexOf("@"));
let extension = email.slice(email.indexOf("@") + 1);
console.log(username);
console.log(extension);
Do django next
bro code doing gods work
you rock bro! thanks a bunch finally im understanding .js!
I'm learning!!
waiting for your react.js tutorial ^^ i love your videos
❤❤Hii❤❤
spreading knowledge
.Good work.
😊ज्ञान बांटने से बढ़ता है😊
Hey bro!..Big fan of yours... could you please consider to make a playlist on Android development
Great idea
Pls make a course on entity framework core
Do django next
Bro can you teach some x++ coding?
the thumbnail💀
H e l l o
Hell
O
So apparently my first name is 0,4 middle name is 4,12 and last name is 12,18
Hey bro. i created a website using HTML and CSS but how to share that as a URL. please reply
REDRUM
can u make a rust course ?
somebody want it too ?
Do django next
Do django next