Published
Edited
Aug 25, 2019
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
jit`
Hello, World!
`
Insert cell
Insert cell
jit`
We'll define 👋 as a string with the value 'Hello, World!';
👋 ⨎ 'Hello, World!'

And now we can just use the wave emoji to output "👋"
`
Insert cell
Insert cell
jit`
📣 ⨎ (left, right) => {
const num = parseInt(left)
const output = []
if (num > 0) {
for (let i = 1; i <= num; ++i) {
output.push(\`\${right === 'reverse' ? num - i : i}\`)
}
}

return '📣 ' + output.join(' ') + ' 📣 Ta Da!'
}

12📣


Or we can count down, in reverse:

20📣reverse
`
Insert cell
Insert cell
jit`

⁒ ⨕ (left, right) => {
const nl = parseFloat(left)
const nr = parseFloat(right)
return nl + (nl * (nr / 100))
}

Let's say we want to calculate 320 + 20%, we could do this: 320⁒20


how about 320 - 20%? we could do this: 320⁒-20
`
Insert cell
Insert cell
Insert cell
jit`
₿ ⨕ (left, right) => ${['calc', btcCalc]}(left, right)
聡 ⨕ (left, right) => ${['calcSatoshi', btcCalcSatoshi]}(left, right)
µ ⨕ (left, right) => ${['calcMilli', btcCalcMilli]}(left, right)


1 btc = ₿ –, 512 BTC are: 512₿ —, $256 is: ₿256 —, $100,000 is: ₿100000 —.

1 btc = ₿GBP –, 512 BTC are: 512₿GBP —, 256 GBP is: GBP₿256 —, 100,000 GBP is: GBP₿100000 —.

1mbtc = µ —, 10 mbtc is 10µ —, 1 mbtc is 1µ —.

1 Satoshi = 聡 —, 100 Satoshis are: 100聡 —, 50k Satoshis are: 50000聡 —, 1,500 Satoshis are: 1500聡 —, $800 in satoshis is: 聡800 —.

Average developer monthly salary in UK is ${`${Math.floor(43000 / 12)}`} GBP - that's: GBP聡3585 ,
or GBP₿3585 .

`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more