function selectLayers(layers) {
  // deselect all layers
  let selectedLayers = getSelectedLayers()
  selectedLayers.forEach(layer => {
    layer.select_byExtendingSelection(false, false)
  })

  // select layers
  layers.forEach(function (layer) {
    layer.select_byExtendingSelection(true, true)
  })
}
Sets the current layer selection to the provided layers.

@param {Array} layers