symdesign
2/13/2017 - 10:50 PM

https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Statements/switch

var orientation;

switch ( window.orientation ) {

    case 0:
    case 180:
    orientation = "portrait";
    break;

    case 90:
    case -90:
    orientation = "landscape";
    break;

}