Web Technologies: JavaScript and Ruby on Rails

Test your knowledge of web development technologies including JavaScript core concepts, browser programming, and Ruby on Rails framework.

16 Questions Published

Questions

Question 1 Multiple Choice (Multiple Answers)

Which of these methods are found in the Object Class?

  1. hashcode()
  2. toString()
  3. equals()
  4. getHashCode()
Question 2 Multiple Choice (Single Answer)

In hibernate mapping file, The method is used to generate

  1. the Object for accessing the database
  2. the foreign key for the new record
  3. the primary key for the new record
  4. the Composite key for the new record
Question 3 Multiple Choice (Single Answer)

Which function accepts input from the user?

  1. accept()
  2. prompt()
  3. input()
  4. enter()
Question 4 Multiple Choice (Single Answer)

Which function identifies the data type of the operand?

  1. isNumber()
  2. isString()
  3. typeof()
  4. Option 1 & 2
Question 5 Multiple Choice (Single Answer)

What is the output for the below lines of code? x = 0/0; alert(x);

  1. undefined
  2. infinity
  3. NaN
  4. None of the above
Question 6 Multiple Choice (Single Answer)

What is the output of the alert function for the below lines of code? var sum, Sum; sum = 0; alert(Sum);

  1. 0
  2. undefined
  3. Exception(0365): object undefined!
  4. Javascript error in the browser
Question 7 Multiple Choice (Single Answer)

var mode = 1; switch (mode){ case 1: document.write('Mode value is 1'); case 2: document.write('Mode value is 2'); case 3: document.write('Mode value is 3'); }

  1. Mode value is 1Mode value is 2Mode value is 3
  2. Mode value is 1
  3. JavaScript error in the browser
  4. None of the above
Question 8 Multiple Choice (Single Answer)

What is the output for the below lines of code? var myArray = new Array(); myArray[10] = "This is the only element in this array"; alert(myArray.length);

  1. 1
  2. 11
  3. undefined
  4. null
Question 9 Multiple Choice (Single Answer)

What is the output for the below lines of code? var main_string = "JavaScript is the best Web Programming language"; var sub_string = "Script"; alert(main_string.indexOf(sub_string));

  1. -1
  2. 4
  3. JavaScript error in the browser
  4. 5
Question 10 Multiple Choice (Single Answer)

Which of the following refers to the parent of a window object?

  1. window.opener
  2. parent
  3. window.parent
  4. All of the above
Question 11 Multiple Choice (Single Answer)

Which event is triggered when an element loses focus?

  1. onfocusout
  2. onblur
  3. onfocuslost
  4. All of the above
Question 12 Multiple Choice (Single Answer)

What is the output for the below lines of code? var pattern = /(dr.*ing)/; var sentence = "The day started drizzling, but now it is heavily raining."; pattern.test(sentence); document.write(RegExp.$1);

  1. drizzling, but now it is heavily raining
  2. The day started drizzling, but now it is heavily raining
  3. drizzling
  4. null
Question 13 True/False

The prime benefit of testing is that it results in reduce defects

  1. True
  2. False
Question 14 Multiple Choice (Multiple Answers)

which of the following are true about file Class? choose all that apply.

  1. you can perform file I/O operations by using its methods
  2. you can find size of the file by using its size() method
  3. you can check if file exists by its exist() method
  4. you can delete the file by its delete() method
Question 15 Multiple Choice (Single Answer)

Rails is written in..?

  1. java
  2. C
  3. Ruby
  4. Cobol
Question 16 Multiple Choice (Single Answer)

what type of architechture will ROR follows?

  1. SOA
  2. MVP
  3. MVC
  4. DODAF