Tag: architecture

Questions Related to architecture

What’s the function of setRequestHeader() method in XMLHttpRequest Object ?

  1. Sends an HTTP request to the server.

  2. Returns all of the HTTP headers.

  3. Sets the name and value of an HTTP Header.

  4. Opens a request to the server.


Correct Option: C

AJAX uses --------------- for information Exchange?

  1. JavaScript

  2. XML

  3. MQ

  4. Java


Correct Option: B

What is the purpose of the 3rd argument in the below command : xmlhttp.open("POST", url, true)

  1. Append the contents of the Text file.

  2. Append the contents of the XML File.

  3. Data will be processed asynchronously.

  4. Data will be process Synchronously.


Correct Option: C
  1. xmlHttp.responseBody

  2. xmlHttp.readyState.

  3. xmlHttp.statusText.

  4. xmlHttp.responseText.


Correct Option: D

How to create an Array in JavaScript?

  1. Var x = new Array(50);

  2. Var x = new Array[50];

  3. Var x = Array(50);

  4. Var x = Array[50];


Correct Option: A

Does JavaScript Function allow to return value ?

  1. True

  2. False


Correct Option: A
  1. Var myDate = new Date(); myDate.setDate(myDate.getDate()+5);

  2. Var myDate = new Date(); myDate.setDate(myDate.getDate()-5);

  3. Var myDate = new Date(); myDate.setDate(5);

  4. None of the above.


Correct Option: A
  1. Var y = Math.sqrt(16);

  2. Var x = Maths.sqrt(16);

  3. Var z = Math.squareroot(16);

  4. Var y = Maths.squareroot(16);


Correct Option: A
  1. var atpos = x.charAt(0);

  2. var atpos = x.charAt(‘A’);

  3. var atpos = x.indexOf(“@”);

  4. var atpos = x.indexOf(‘@’);


Correct Option: C