The source code...
// MODEL: simple scalar model
var gXYZ = new ScalarModel();
// VIEW: view of XYZ scalar model
View.Add( "xyzView", new ScalarView( gXYZ ) );
// CONTROLLER: button to invoke "clear XYZ scalar model" event
View.Add( "clrBtn", new ButtonController( "Clear XYZ", "onClearBtnPressed" ) );
// EVENT HANDLERS...
function onClearBtnPressed(){ gXYZ.setValue("cleared"); }
function onLoadPage(){
gXYZ.setValue("I am the initial value of XYZ");
document.getElementById("OutputArea").innerHTML = gXYZ.getValue();
}