Nested If/else is bebe

by Przmak

JavaScript

function isOxford(val) {
  return val === "sbc-oxford";
}

function showA() {
  $("#sbcox-ge").show();
  $("#sbcox-ss").hide();
  $("#button-overall").hide();
}

function hideA() {
  $("#sbcox-ge").hide();
  $("#sbcox-ss").hide();
  $("#button-overall").show();
}
var yourValue = 'sbc-oxford';

function run(){
  if(isOxford(yourValue)){
    return showA();
  }
  return hideA();
}

run();