Search Header Logo

java script if switch

Authored by Ahmed elasey

Computers

11th Grade

Used 8+ times

java script if switch
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

<body>

<p id="demo">Good Evening!</p>

<script>

if (new Date().getHours() < 18)

document.getElementById("demo").innerHTML = "Good day!";

}

</script>

</body>

الكود خطأ

الكود صح

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

<body>

<p id="demo">Good Evening!</p>

<script>

if (new Date().getHours() < 18) {

document.getElementById("d").innerHTML = "Good day!";

}

</script>

</body>

الكود خطأ

الكود صح

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

<body>

<p id="demo">Good Evening!</p>

<script>

if (new Date().getHours < 18) {

document.getElementById("demo").innerHTML = "Good day!";

}

</script>

</body>

الكود خطأ

الكود صح

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

<body>

<p id="demo">Good Evening!</p>

<script>

if (new Date().getHours() < 18) {

document.getElementById("demo").innerHTML = "Good day!";

}

</script>

</body>

الكود خطأ

الكود صح

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

اى من الدوال الاتية تعتبر من الدوال الشرطية

if

switch

كل الاجابات صح

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

if (hour < 18) {
  greeting = "Good day";
} else {
  greeting = "Good evening";
}

الكود خطأ

الكود صح

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

<p id="demo"></p>
var x> 6;

if (x < 18) {
  greeting = "big";
} else {
  greeting = "small";
}

document.getElementById("demo").innerHTML =" greeting";

big

small

greeting

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?