Skip to content

Instantly share code, notes, and snippets.

@dwtkns
Created February 7, 2013 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwtkns/4730608 to your computer and use it in GitHub Desktop.
Save dwtkns/4730608 to your computer and use it in GitHub Desktop.
{
"libraries": [
"d3"
],
"mode": "javascript",
"layout": "fullscreen mode (horizontal)",
"resolution": "reset"
}
#box {
font-size: 30px;
}
<div id="box"></div>
var text_to_show = "Hello!";
//var array = [ 11, 22, 33, 44 ];
//var array = [ "eleven", "twenty-two", "thirty-three", "fourty-four" ]
//var some_number = 44;
//var array = [ 11 , 22 , 33 , some_number , text_to_show ];
//text_to_show = array[0]
//var apple = { color: "green", variety: "Granny Smith", taste: "Fantastic!" }
//var description_of_apple = "The " + apple.variety + " was " + apple.color + " and tasted " + apple.taste;
//text_to_show = description_of_apple;
//var some_number = 1;
//if (some_number < 10) {
// text_to_show = n;
//}
//console.log(description_of_apple);
//-----
document.getElementById("box").innerHTML = text_to_show;
//d3.select("#box").text(my_text);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment