switch(a) {
case 1:
console.log(1);
case 2:
case 3:
case 4:
console.log(1-4);
break;
case(5):
console.log(5);
break;
default:
console.log('not found');
break;
}
if (a===1 || a===2 || a===3 || a===4) {
if (a===1) {
console.log(1);
}
console.log(1-4);
} else if (a===5) {
console.log(5);
} else {
console.log('not found')
}
Access-Control-Allow-Origin: *
не будет работать, если установлено Access-Control-Allow-Credentials: true
. Попробуйте Access-Control-Allow-Origin: http://192.168.122.135
.