Tag: web technology

Questions Related to web technology

  1. alert("Hello World")

  2. alertBox="Hello World"

  3. alertBox("Hello World")

  4. msgBox("Hello World")


Correct Option: A
  1. function myFunction()

  2. function=myFunction()

  3. function:myFunction()

  4. function myFunction


Correct Option: A
  1. call myFunction()

  2. call function myFunction

  3. myFunction()

  4. call function myFunction()


Correct Option: C

How do you write a conditional statement for executing some code if "i" is equal to 5?

  1. if (i==5)

  2. if i=5 then

  3. if i=5

  4. if i==5 then


Correct Option: A

AI Explanation

To write a conditional statement for executing some code if "i" is equal to 5, you can use the following syntax:

A) if (i==5)

Explanation: Option A is the correct answer. In most programming languages, the double equals sign "" is used to represent equality. The condition `(i5)` checks if the variable "i" is equal to 5. If the condition evaluates to true, the code block following the if statement will be executed.

How do you write a conditional statement for executing some code if "i" is NOT equal to 5?

  1. if =! 5 then

  2. if (i != 5)

  3. if (i <> 5)

  4. if <> 5


Correct Option: B
  1. while (i<=10)

  2. while (i<=10;i++)

  3. while i=1 to 10

  4. while (i=0;i<=10;i++)


Correct Option: A
  1. for (i = 0; i <= 5)

  2. for i = 1 to 5

  3. for (i <= 5; i++)

  4. for (i = 0; i <= 5; i++)


Correct Option: D
  1. //This is a comment

  2. 'This is a comment

  3. /*This is a comment


Correct Option: A
  1. //This comment has more than one line//

  2. /This comment has more than one line/

  3. 'This comment has more than one line


Correct Option: C
  1. var txt = new Array(1:"tim",2:"kim",3:"jim")

  2. var txt = new Array("tim","kim","jim")

  3. var txt = new Array:1=("tim")2=("kim")3=("jim")

  4. var txt = new Array="tim","kim","jim"


Correct Option: B