function updateNextShape() {
  var svg = document.getElementById('next');
  // Delete existing shape.
  while (svg.firstChild) {
    svg.removeChild(svg.firstChild);
  }
  // Add the new shape.
  nextShapeName = randomShapeName();
  var shape = new CurrentShape(nextShapeName);
  svg.appendChild(shape.g);
}
// Replace the 'next shape' display with a new shape.
Replace the 'next shape' display with a new shape.
Replace the ' next shape ' display with a new shape .
function updateNextShape() {
  var svg = document.getElementById('next');
  while (svg.firstChild) {
    svg.removeChild(svg.firstChild);
  }
  nextShapeName = randomShapeName();
  var shape = new CurrentShape(nextShapeName);
  svg.appendChild(shape.g);
}
function updateNextShape ( ) { var svg = document . getElementById ( 'next' ) ; while ( svg . firstChild ) { svg . removeChild ( svg . firstChild ) ; } nextShapeName = randomShapeName ( ) ; var shape = new CurrentShape ( nextShapeName ) ; svg . appendChild ( shape . g ) ; }
Replace the 'next shape' display with a new shape.
Replace the ' next shape ' display with a new shape .
// Delete existing shape. // Add the new shape.