Platform
Resources
Pricing
Sign in
Get started
Jerry Jäppinen
Design, tech, engineering and science. Head of Design and User Research.
Workspace
Fork
Public
By
Jerry Jäppinen
Edited
Jan 6, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
todaysList
(
1
,
2
,
3
,
4
,
5
,
6
)
Insert cell
Insert cell
DateTime
=
(
await
import
(
'luxon'
)
)
.
DateTime
Insert cell
today
=
todayRaw
.
toJSDate
(
)
Insert cell
todayRaw
=
DateTime
.
utc
(
)
.
startOf
(
'day'
)
Insert cell
Insert cell
import
{
shuffleSeeded
}
from
"@jerryjappinen/math"
Insert cell
function
todaysOrder
(
...
args
)
{
const
values
=
_
.
flatten
(
args
)
// Shuffle indexes to random order
const
indexes
=
_
.
range
(
0
,
values
.
length
)
;
const
shuffledIndexes
=
shuffleSeeded
(
indexes
,
today
.
getTime
(
)
)
;
// Compose markdown
// return md`${shuffledIndexes.map((nameI, i) => {
// return `${i}. ${values[nameI]}\n`;
// })}`;
return
shuffledIndexes
.
map
(
i
=>
values
[
i
]
)
}
Insert cell
function
todaysList
(
...
args
)
{
const
list
=
todaysOrder
(
...
args
)
return
md
`${
list
.
map
(
(
value
,
i
)
=>
{
return
`${
i
}. ${
value
}\n`
;
}
)
}`
;
}
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
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
DateTime
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
today
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
todayRaw
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
todaysOrder
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
todaysList
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML