You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeof(null) - возвращает "object". "object" не может сравниваться с null;
let answer = null;
if(answer == null) {
break;
}
// typeof(answer) == null - не будет работать, потому что сравниваться будет "object" == null
В последующих задачах/файлах такой же код.
Если будет задача что-то сделать при "Cancel - null" от пользователя, то такое сравнение никогда не сработает
The text was updated successfully, but these errors were encountered:
if ( typeof(a) === 'string' && typeof(a) != null && typeof(b) != null
typeof(null)
- возвращает "object". "object" не может сравниваться с null;// typeof(answer) == null
- не будет работать, потому что сравниваться будет"object" == null
В последующих задачах/файлах такой же код.
Если будет задача что-то сделать при "Cancel - null" от пользователя, то такое сравнение никогда не сработает
The text was updated successfully, but these errors were encountered: