switch (true) { case (bodyWidth > 1600): fun1(); break; case (bodyWidth > 1000): fun2(); break; case (bodyWidth > 600): fun3(); break; default: fun4(); break; }