Tag: web technology

Questions Related to web technology

In JavaScript, capital letters are different from lowercase letters ?

  1. Not on windows platforms

  2. Yes

  3. No

  4. Not on Linux Platform


Correct Option: B
  1. overMouse event

  2. onMouseOver event

  3. onRollOver event

  4. OnMouseOut event


Correct Option: B
  1. stringName.charAt(0);

  2. stringName.substring(1);

  3. stringName.charAt(1);

  4. stringName.charAt(2);


Correct Option: A

Which has no syntax error ?

  1. alert("hello "+3+" times);

  2. alert("hello "+3 times);

  3. alert("hello +3+ times");

  4. alert("hello "+3 +" times);


Correct Option: C

AI Explanation

To answer this question, we need to understand the syntax rules for JavaScript.

Option A) alert("hello "+3+" times); - This option has a syntax error. The closing parenthesis is missing at the end of the statement. The correct syntax should be alert("hello "+3+" times");.

Option B) alert("hello "+3 times); - This option also has a syntax error. The multiplication operator (*) is missing between the number 3 and the word "times". The correct syntax should be alert("hello "+3 * times); or alert("hello "+(3 * times)); depending on the value of the variable times.

Option C) alert("hello +3+ times"); - This option has no syntax error. It concatenates the string "hello ", the number 3, and the string " times" without any issues.

Option D) alert("hello "+3 +" times); - This option also has a syntax error. The closing parenthesis is missing at the end of the statement. The correct syntax should be alert("hello "+3 +" times");.

The correct answer is C. This option has no syntax error because it follows the correct syntax rules for concatenating strings and numbers in JavaScript.

  1. popUp(PageURL,WindowName,settings);

  2. window.launch(PageURL,WindowName,settings);

  3. window.close(PageURL,WindowName,settings);

  4. window.open(PageURL,WindowName,settings);


Correct Option: D
  1. stringVariable.substring(subString)

  2. stringVariable.find(subString)

  3. stringVariable.indexOf(subString)

  4. stringVariable.indexOf(charAt(0))


Correct Option: C