i do not understand where the binding to the language variable comes in this notebook.
thx
newbie
i do not understand where the binding to the language variable comes in this notebook.
thx
newbie
The third cell of your notebook consists of this code:
map.setLayoutProperty("country-label-lg", "text-field", [
"get",
"name_" + language
])
Note that it contains a reference to language
.
The Observable parser is smart enough to know that language
must be a reference to another cell, thus the Observable compiler compiles that cell into this in the downloaded code:
main.variable(observer()).define(["map","language"], function(map,language){return(
map.setLayoutProperty("country-label-lg", "text-field", [
"get",
"name_" + language
])
Does that answer your question?