JavaScript, AJAX, and Unix Commands Quiz

A mixed quiz covering JavaScript programming, AJAX development, and Unix/Linux commands including VI editor usage

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Purpose of the command ZZ in VI Editor?

  1. to exit, if changes are not made to the file.
  2. forced quit, it will discard the changes and quit.
  3. save and Exit.
  4. forces over writes.
Question 2 Multiple Choice (Single Answer)

I have set the variable dateString to the following format [export dateString=date -u +%Y%m%d]. What would be Output when I echo $dateString?

  1. YYYYMONDD
  2. MMDDYYYY
  3. YYYYMMDD
  4. YYYYDDMM
Question 3 Multiple Choice (Single Answer)

Need to change from Source to target Directory. Please select the best option : Source Directory : /cmdev/csb_cussat/201106/hpux Target Directory : /cmdev/csb_cussat/201109/hpux

  1. $cd 201109 201106
  2. $cd 201106 201109
  3. $cd /cmdev/csb_cussat/201106/hpux
  4. None of the above.
Question 4 Multiple Choice (Single Answer)

In VI Editor Input Mode- what’s the command to place the insertion point after the current character?

  1. a – Append.
  2. i – insert.
  3. o – open mode.
  4. R – replace.
Question 5 Multiple Choice (Single Answer)

What’s the Command in VI Editor to take you to the End of the Line?

  1. b
  2. h
  3. $
  4. W
Question 6 Multiple Choice (Single Answer)

Command in VI Editor to paste the copied lines from buffer to the line below?

  1. u
  2. yy
  3. x
  4. p
Question 7 Multiple Choice (Single Answer)

Main Feature of AJAX:

  1. Reloads the Whole Page and take less time.
  2. Reloads only the necessary changes on the Current Page and takes less time.
  3. Both
  4. None of the above.
Question 8 Multiple Choice (Single Answer)

Purpose of the Assignment Operator “^=” in JavaScript?

  1. Assigns the value of the Second Operand to the first Operand.
  2. Subtracts 2 operands and assigns the result to the first operand.
  3. Performs a bitwise exclusive OR operation on 2 operands and assigns the result to the first operand.
  4. Performs a bitwise OR operation on 2 operands and assigns the result to the first operand.
Question 9 Multiple Choice (Single Answer)

AJAX Libraries Used :

  1. JQuery.
  2. DOJO.
  3. Both a and b.
  4. None of the above.
Question 10 Multiple Choice (Single Answer)

Features of JQuery used in developing AJAX Application?

  1. CSS manipulation.
  2. DOM Traversal and modification.
  3. Both a and b
  4. None of the above.
Question 11 Multiple Choice (Single Answer)

When the browser returns the HTTP Status Code 407 – What it indicates?

  1. Bad Request
  2. Unauthorized
  3. Request Timeout
  4. Proxy Authentication Required
Question 12 True/False

Inner Functions allowed in JavaScript?

  1. True
  2. False
Question 13 Multiple Choice (Single Answer)

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

  1. Opens a Request to the server.
  2. Returns the value of an HTTP header.
  3. Aborts the HTTP Request.
  4. None of the above.
Question 14 Multiple Choice (Single Answer)

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.
Question 15 Multiple Choice (Single Answer)

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

  1. JavaScript
  2. XML
  3. MQ
  4. Java
Question 16 Multiple Choice (Single Answer)

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.
Question 17 Multiple Choice (Single Answer)

What’s the property to get the return value from Server in JavaScript?

  1. xmlHttp.responseBody
  2. xmlHttp.readyState.
  3. xmlHttp.statusText.
  4. xmlHttp.responseText.
Question 18 Multiple Choice (Single Answer)

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];
Question 19 True/False

Does JavaScript Function allow to return value ?

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

Using JavaScript Fucntion need to set Date to 5 days into the Future. Select the Correction option?

  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.