Platform
Resources
Pricing
Sign in
Get started
Ki Yung Ahn
Workspace
Fork
Published
By
Ki Yung Ahn
Edited
Jun 3, 2019
Fork of
higher-order-function on arrays 배열에 대한 고차함수
Insert cell
src
=
html
`
<ul>
<li>abc</li>
<li>ab</li>
</ul>
`
Insert cell
dest
.
childNodes
.
length
Insert cell
dest
=
{
// src에서 li의 내용이 2보다 큰 것만 복사
let
ul
=
document
.
createElement
(
"ul"
)
;
Array
.
from
(
src
.
querySelectorAll
(
"li"
)
)
.
filter
(
x
=>
x
.
textContent
.
length
>
2
)
.
forEach
(
x
=>
ul
.
appendChild
(
x
.
cloneNode
(
true
)
)
)
return
ul
}
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Compare fork
Fork
View
Export
src
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dest
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML