Javascript Tagalog - String charAt Method

mmvergara - Aug 21 '22 - - Dev Community

Ano ngaba ang String charAt method sa Javascript?
Pano gamitin:
First Argument - bigay mo yung index (number) tapos re return niya yung character na nasa index nayon

const x = 'Hello'

console.log( x.charAt(0) ) // H
console.log( x.charAt(1) ) // e
console.log( x.charAt(2) ) // l
console.log( x.charAt(3) ) // l
console.log( x.charAt(4) ) // o

// di naapektuhan yung original string
console.log( x ) // Hello
Enter fullscreen mode Exit fullscreen mode

Notice from: Frank Wisniewski
"this only works as long as the strings do not contain unicode characters"
so pag may emoji or unicode characters gumamit nalang ng match method


More tagalog Javascript Learning Resources:
https://javascript-methods-in-tagalog.vercel.app/

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player