Answer the question
In order to leave comments, you need to log in
Where is the error in the switch case?
I downloaded a new (maybe not new) course from Udemy and I do it exactly as in the lecture, but either an error falls out or I don’t understand what it is.
Here is js:
let num = 50;
switch (num) {
case num > 60:
console.log("Нет, переменная меньше 60");
break;
case num < 40:
console.log("Нет, переменная больше 40");
break;
case num == 50:
console.log("Да, переменная ровна 50");
break;
}
[Deprecation] Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.
createShadowTree @ include.preload.js:411
ElemHide @ include.preload.js:384
(anonymous) @ include.preload.js:512
[Violation] '2P_181d5151-666a-4b23-9dd3-0fe5446b5451' handler took 242ms
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question