Where to introduce instructions to remove the black background?

Dear all,
I am really a newbie in Cesium. My problem is to turn the background white instead of black with stars.
I found the instructions here in the forum.

    scene.skyBox.destroy();

scene.skyBox = undefined;

scene.sun.destroy();

scene.sun = undefined;

scene.backgroundColor = Color.WHITE.clone();

But where should I type the instructions?
I tried inside and after the creation of the viewer but it does not work as intended. Maybe scene is undefined in my code?
Thanks for help,
Alain

Sandcastle’s a great way to try things.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var scene = viewer.scene;

scene.skyBox.destroy();

scene.skyBox = undefined;

scene.sun.destroy();

scene.sun = undefined;

scene.backgroundColor = Cesium.Color.WHITE.clone();

``

Dear Scott,
thanks for the advice, and indeed it works in the sandcaslte, but not on my local server with the following instructions (I do not put all the html code around, or should I?)
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
sceneModePicker : false,
globe : false
}
);
var scene = viewer.scene;
scene.skyBox.destroy();
scene.skyBox = undefined;
scene.sun.destroy();
scene.sun = undefined;
scene.backgroundColor = Cesium.Color.WHITE.clone();

``

I got a message saying
"Developper error: This object was destroyed, i.e., destroy() was called.

Hello,

Here is a more simple way to achieve this:

var viewer = new Cesium.Viewer(‘cesiumContainer’, {
skyBox: false
});

viewer.scene.backgroundColor = Cesium.Color.WHITE.clone();

``

Try that code and let me know if you are still seeing an error.

Best,

Hannah