FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript/Strings.js at master · VCalazans/JavaScript · GitHub
VCalazans
/
JavaScript
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScript
/
Strings.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (11 loc) · 666 Bytes
Breadcrumbs
JavaScript
/
Strings.js
Copy path
File metadata and controls
16 lines (11 loc) · 666 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Trabalhando com Strings
const
escola
=
"Cod3r"
console
.
log
(
escola
.
charAt
(
4
)
)
// retorna "r"
console
.
log
(
escola
.
charAt
(
5
)
)
// Não retorna nada, e nem acusa erro.
console
.
log
(
escola
.
charCodeAt
(
3
)
)
// Retorna seu respectivo código na tabela assc
console
.
log
(
escola
.
indexOf
(
'3'
)
)
// Retorna o indice em que se encontra o caractere.
console
.
log
(
escola
.
substring
(
1
)
)
// Vai copiar a string a partir do indice 1
console
.
log
(
escola
.
substring
(
0
,
3
)
)
//A partir da posição 0 copia 3 Strings.
console
.
log
(
'Escola'
.
concat
(
escola
)
.
concat
(
"!"
)
)
console
.
log
(
escola
.
replace
(
3
,
'e'
)
)
//No indice 3 substitui o caractere por e
console
.
log
(
'Ana, Maria, Pedro'
.
split
(
','
)
)
Back
|
FazBrowse Home
|
New Git URL