Platform
Resources
Pricing
Sign in
Get started
Amazing Design
Workspace
Fork
Published
By
Amazing Design
Edited
Aug 28, 2018
Insert cell
Insert cell
Insert cell
{
const
names
=
[
'Pati'
,
'Ala'
,
'Ola'
]
for
(
let
i
=
0
;
i
<
names
.
length
;
i
++
)
{
console
.
log
(
i
)
}
}
Insert cell
{
const
names
=
[
'Pati'
,
'Ala'
,
'Ola'
]
for
(
let
i
=
0
;
i
<
names
.
length
;
i
++
)
{
console
.
log
(
names
[
i
]
)
}
}
Insert cell
{
const
names
=
[
'Pati'
,
'Ala'
,
'Ola'
]
let
name
=
''
for
(
let
i
=
0
;
i
<
names
.
length
;
i
++
)
{
if
(
i
===
names
.
length
-
1
)
{
name
=
name
+
names
[
i
]
}
else
{
name
=
name
+
names
[
i
]
+
' '
}
}
return
name
}
Insert cell
{
const
names
=
[
'Pati'
,
'Ala'
,
'Ola'
]
let
name
=
''
for
(
let
i
=
0
;
i
<
names
.
length
;
i
++
)
{
name
=
(
i
===
names
.
length
-
1
)
?
name
+
names
[
i
]
:
name
+
names
[
i
]
+
' '
}
return
name
}
Insert cell
{
const
names
=
[
'Pati'
,
'Ala'
,
'Ola'
]
let
name
=
''
for
(
let
i
=
0
;
i
<
names
.
length
;
i
++
)
{
name
=
name
+
names
[
i
]
+
(
(
i
===
names
.
length
-
1
)
?
''
:
' '
)
}
return
name
}
Insert cell
{
const
sum
=
function
(
)
{
let
sum
=
0
for
(
let
i
=
0
;
i
<
arguments
.
length
;
i
++
)
{
sum
=
sum
+
arguments
[
i
]
}
return
sum
}
return
sum
(
1
,
5
,
15
,
3
)
}
Insert cell
{
const
sum
=
function
(
first
)
{
let
numbers
=
arguments
let
sum
=
0
if
(
typeof
first
!==
'number'
)
{
numbers
=
first
}
for
(
let
i
=
0
;
i
<
numbers
.
length
;
i
++
)
{
sum
=
sum
+
numbers
[
i
]
}
return
sum
}
return
sum
(
[
1
,
5
,
15
,
3
]
)
}
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
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML