FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScriptCrash-Making/inseong-so/04_BaseAlgorithm/03.js at main · pagers-org/JavaScriptCrash-Making · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
pagers-org
/
JavaScriptCrash-Making
Public
Notifications
You must be signed in to change notification settings
Fork
5
Star
4
Code
Issues
5
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
JavaScriptCrash-Making
/
inseong-so
/
04_BaseAlgorithm
/
03.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (15 loc) · 424 Bytes
Breadcrumbs
JavaScriptCrash-Making
/
inseong-so
/
04_BaseAlgorithm
/
03.js
Copy path
File metadata and controls
17 lines (15 loc) · 424 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
15
16
17
const
solution
=
str
=>
{
let
index
=
0
;
for
(
let
char
of
str
)
{
if
(
char
===
'('
)
index
+=
1
;
else
index
-=
1
;
if
(
index
<
0
)
return
false
;
}
return
index
===
0
?
true
:
false
;
}
;
// 입력 예제를 풍부하게 만들어서 while문으로 입력을 받아보세요.
require
(
'fs'
)
.
readFileSync
(
'./dev_03'
)
.
toString
(
)
.
split
(
require
(
'os'
)
.
EOL
)
.
forEach
(
item
=>
console
.
log
(
solution
(
item
)
)
)
;
Back
|
FazBrowse Home
|
New Git URL