title: Better way to write fallback selector?
body: <p>I've got a function that works but I'm wondering if there is a better way to do it.</p>
  
  <p>I've got 5 sizes and I'm trying to get the zoom level for the current size. The catch is if the current size doesn't specify a size I want to check the other smaller sizes to see if there is one specified to use.</p>
  
  <p>That is if there is no XL zoom specified, check is there is a LG to use and if not, check if there is a MD size, etc.</p>
  
  <p>Currently I have a big <code>switch</code> with a bunch of <code>if</code>/<code>else</code> statements. Any cleaner way to do this that I'm missing?</p>
  
  <pre><code>self.updateZoom = function () {
    var defaultZoomLevel = 8;
  
    switch(self.getSize()) {
    case 'xs':
      if (self.xsZoom) {
        self.zoom = self.xsZoom;
      } else {
        self.zoom = defaultZoomLevel;
      }
      break;
    case 'sm':
      if (self.smZoom) {
        self.zoom = self.smZoom;
      } else if (self.xsZoom) {
        self.zoom = self.xsZoom;
      } else {
        self.zoom = defaultZoomLevel;
      }
      break;
    case 'md':
      if (self.mdZoom) {
        self.zoom = self.mdZoom;
      } else if (self.smZoom) {
        self.zoom = self.smZoom;
      } else if (self.xsZoom) {
        self.zoom = self.xsZoom;
      } else {
        self.zoom = defaultZoomLevel;
      }
      break;
    case 'lg':
      if (self.lgZoom) {
        self.zoom = self.lgZoom;
      } else if (self.mdZoom) {
        self.zoom = self.mdZoom;
      } else if (self.smZoom) {
        self.zoom = self.smZoom;
      } else if (self.xsZoom) {
        self.zoom = self.xsZoom;
      } else {
        self.zoom = defaultZoomLevel;
      }
      break;
    case 'xl':
      if (self.xlZoom) {
        self.zoom = self.xlZoom;
      } else if (self.lgZoom) {
        self.zoom = self.lgZoom;
      } else if (self.mdZoom) {
        self.zoom = self.mdZoom;
      } else if (self.smZoom) {
        self.zoom = self.smZoom;
      } else if (self.xsZoom) {
        self.zoom = self.xsZoom;
      } else {
        self.zoom = defaultZoomLevel;
      }
      break;
    default:
      self.zoom = defaultZoomLevel;
    }
  
    self.zoom = parseInt(self.zoom);
  }
  </code></pre>