run "Managing Entities" in "visualizing spatial data" part in cesium tutorial

Hi,
I want to run "Managing Entities" in "visualizing spatial data" part in tutorial. but i cant it,

This is so necessary.

"To see this in action, let’s use the Geometry Showcase example in Sandcastle. Copy and paste the below code near the top, immediately after the viewer is created.

function onChanged(collection, added, removed, changed){
  var msg = 'Added ids';
  for(var i = 0; i < added.length; i++) {
    msg += '\n' + added[i].id;
  }

  console.log(msg);
}

I dont know to use this code in sample, please guide me for use this code in a sample.

Please give me e sample code for use this code in a whole sample.

Thank you,
Motamedi

Hello Motamedi,

Paste that code sample right after “var entities = viewer.entities;” on the fourth line of this demo: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Geometry%20and%20Appearances.html&label=Showcases

You should see a print out to the console when you run the example.

Best,

Hannah