function logItType(output) {
console.log(typeof output, ";", output);
}
console.log("Looking at dynamic nature of types in JavaScript")
logItType("hello"); // String
logItType(2020); // Number
logItType([1, 2, 3]); // Object is generic for this Array, which similar to Python List
$$.async();
console.log("Hello, World!");
var action = {
$$: $$,
console: console,
};
setTimeout(function() {
$$.clear(0); // clear output cell
action.$$.sendResult("Goodbye!");
}, 2000); // 2 second timer
Person.prototype._toHtml = function _toHtml() {
var style = (
"display:inline-block;" +
"padding:0.25em;" +
"background:#ccc;" +
"border: 1px solid #888;" +
"border-radius:0.25em;" +
"box-shadow: 0.8em 0.4em 0.4em black;"
);
return (
"<div style='" + style + "'>" +
this.inspect() +
"</div>"
);
};
peter;