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.
Questions
Which of these methods are found in the Object Class?
- hashcode()
- toString()
- equals()
- getHashCode()
In hibernate mapping file, The method is used to generate
- the Object for accessing the database
- the foreign key for the new record
- the primary key for the new record
- the Composite key for the new record
Which function accepts input from the user?
- accept()
- prompt()
- input()
- enter()
Which function identifies the data type of the operand?
- isNumber()
- isString()
- typeof()
- Option 1 & 2
What is the output for the below lines of code? x = 0/0; alert(x);
- undefined
- infinity
- NaN
- None of the above
What is the output of the alert function for the below lines of code? var sum, Sum; sum = 0; alert(Sum);
- 0
- undefined
- Exception(0365): object undefined!
- Javascript error in the browser
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'); }
- Mode value is 1Mode value is 2Mode value is 3
- Mode value is 1
- JavaScript error in the browser
- None of the above
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
- 11
- undefined
- null
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
- 4
- JavaScript error in the browser
- 5
Which of the following refers to the parent of a window object?
- window.opener
- parent
- window.parent
- All of the above
Which event is triggered when an element loses focus?
- onfocusout
- onblur
- onfocuslost
- All of the above
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);
- drizzling, but now it is heavily raining
- The day started drizzling, but now it is heavily raining
- drizzling
- null
The prime benefit of testing is that it results in reduce defects
- True
- False
which of the following are true about file Class? choose all that apply.
- you can perform file I/O operations by using its methods
- you can find size of the file by using its size() method
- you can check if file exists by its exist() method
- you can delete the file by its delete() method
Rails is written in..?
- java
- C
- Ruby
- Cobol
what type of architechture will ROR follows?
- SOA
- MVP
- MVC
- DODAF