JavaScript-də yalanı yoxlamağın qısaldılmış forması

Indi tutaq ki, dəyişənin yalan olmasını yoxlamaq istəyirik. Bunu aşağıdakı kimi edə bilərik:

javascriptlet test = true;

if (test === false) {
  console.log('+++');
} else {
  console.log('---');
}

Ekvivalent kodu inkar ilə də yazmaq olar:

javascriptlet test = true;

if (test !== true) {
  console.log('+++');
} else {
  console.log('---');
}

Verilmiş kod aşağıdakı kimi qısaldılmış formada yenidən yazıla bilər:

javascriptlet test = true;

if (!test) {
  console.log('+++');
} else {
  console.log('---');
}
Задание 1

Aşağıdakı kodu qısaldılmış formadan istifadə edərək yenidən yazın:

javascriptlet test = true;

if (test == false) {
  console.log('+++');
} else {
  console.log('---');
}
Задание 2

Aşağıdakı kodu qısaldılmış formadan istifadə edərək yenidən yazın:

javascriptlet test = true;

if (test != true) {
  console.log('+++');
} else {
  console.log('---');
}
Задание 3

Aşağıdakı kodu qısaldılmış formadan istifadə edərək yenidən yazın:

javascriptlet test = true;

if (test != false) {
  console.log('+++');
} else {
  console.log('---');
}