Published
Edited
Jul 3, 2018
Insert cell
Insert cell
Insert cell
{
const add = (a, b) => {
return a + b
}
return add(2, 3)
}
Insert cell
Insert cell
Insert cell
{
const add = (a, b) => a + b
return add(2, 3)
}
Insert cell
Insert cell
{
const add = (a, b) => const sum = a + b
return add(2, 3)
}
Insert cell
Insert cell
{
const add = (a, b) => return a + b
return add(2, 3)
}
Insert cell
Insert cell
{
const returnNumber = x => x
return returnNumber(10)
}
Insert cell
{
const square = x => x * x
return square(10)
}
Insert cell
Insert cell
{
const returnTwo = () => 2
return returnTwo(111)
}
Insert cell
Insert cell
{
const makePerson = (name, lastname) => ({
name: name,
lastname: lastname
})
return makePerson('Mateusz', 'Choma')
}
Insert cell
Insert cell
{
const makePerson = (name, lastname) => {
return {
name: name,
lastname: lastname
}
}
return makePerson('Mateusz', 'Choma')
}
Insert cell
Insert cell
Insert cell
{
const foo = () => arguments

return foo(1, 2, 'Ala', {}, [5,6])
}
Insert cell
{
const sumAllArgumentsWithHOF = (...args) => args.reduce((reduced, element) => reduced + element, 0)
return sumAllArgumentsWithHOF(1, 2, 3, 4 ,5)
}
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