Published
Edited
Mar 6, 2018
Insert cell
Insert cell
Insert cell
{
const sourceArray = [...Array(100).keys()].map(num => num + 1)
return sourceArray
}
Insert cell
Insert cell
Insert cell
{
const sourceArray = [...Array(100).keys()].map(num => num + 1)
const result = sourceArray.map(num => {
if(num % 3 === 0 && num % 5 === 0) {
return `online banking (${num})`
}
if(num % 3 === 0) {
return `online (${num})`
}
if(num % 5 === 0) {
return `banking (${num})`
}
return null
}).filter(res => res != null)
return result
}
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.
Learn more