Insert cell
Insert cell
Insert cell
{
// COUNTING TO TEN
var count = 0
while( count !== 10 ) { //Notice that count !== 10 evaluates to a boolean
count = count + 1;
}
return count;
}
Insert cell
Insert cell
Insert cell
Insert cell
{
// COUNTING TO TEN
var count = 0
for( var i = 0; i < 10; i = i + 1 ) {
count = count + 1
}
return count
}
Insert cell
{
//An alternate way of counting to 10
for( var count = 0; count < 10; count = count + 1 ) {
//We're not doing anything inside the for loop except repeating it 10 times...
}
return count
}
Insert cell
Insert cell
Insert cell
function front3(str) {
return undefined;
}
Insert cell
Insert cell
Insert cell
function findPrimes(input)
{
return undefined;
}
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