Platform
Resources
Pricing
Sign in
Contact us
Charles Redmond
Workspace
Fork
Published
Data Structures and Algorithms
By
Charles Redmond
Edited
Mar 11, 2020
Fork of
Arrow Functions
1 star
Insert cell
Insert cell
{
var
hello
=
(
n
)
=>
{
if
(
n
<
5
)
{
hello
(
n
+
1
)
}
console
.
log
(
n
)
}
hello
(
1
)
}
Insert cell
Insert cell
{
var
factorial
=
(
n
)
=>
{
if
(
n
==
0
)
{
return
1
}
else
{
return
n
*
factorial
(
n
-
1
)
}
}
return
factorial
(
10
)
}
Insert cell
Insert cell
{
var
fib
=
n
=>
{
if
(
n
==
0
)
{
return
0
}
else
if
(
n
==
1
)
{
return
1
}
else
{
return
fib
(
n
-
1
)
+
fib
(
n
-
2
)
}
}
return
fib
(
11
)
}
Insert cell
Insert cell
Insert cell
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML