Published
Edited
Oct 12, 2020
Insert cell
html `<h1>lesson5</h1>`
Insert cell
variable = {
var test = 1;
return test;
}
Insert cell
md `## object`
Insert cell
obj = {
return {
"cat" : 1,
"dog" : 2,
"fish" : [ {eyes: 3, legs: 4}, {eyes: 2, legs: 5}]
}
}
Insert cell
test1 = {
return obj.cat;
}
Insert cell
test2 = {
return obj ["dog"];
}
Insert cell
md `## function`
Insert cell
make_fish = {
//fish generator here
/*
two
lines
*/
return function (eyes, legs){
return {"eyes": eyes,
"legs": legs
};
}
}
Insert cell
addiction = {
return make_fish
(3,2);
}
Insert cell
md `## massives`
Insert cell
my_array = [1,2,3,4]
Insert cell
md `description of the following block`
Insert cell
my_length = my_array.length
Insert cell
console.log(my_array);
Insert cell
md `2fishh`
Insert cell
fish_array = [{legs: 3, eyes: 4}, {legs: 2, eyes: 5}]
onefish = fish_array[1]
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