SALARY - 22/100 Моля за помощ..
function solve(input) {
let nOpenTabs = Number(input[0]);
let salary = Number(input[1]);
let sites = 0;
for(let i = 1; i <= nOpenTabs + 1; i++) {
switch(sites) {
case "Facebook":
salary -= 150;
break;
case "Instagram":
salary -= 100;
break;
case "Rebbit":
salary -= 50;
break;
}
if(salary <= 0) {
console.log("You have lost your salary.");
return;
} else {
console.log(salary);
return;
}
}
}