Javascript interview questions part 34

Javascript interview questions part 34

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. What is the purpose of the UgilifyJS?

Correct Answer is : Both Exposes a simple API and Minification

2. Which of the following is the fastest JavaScript parser?

Correct Answer is : Acron

3. The ‘$’ present in the RegExp object is called a ____________

Correct Answer is : metacharacter

4. Consider the following statement containing regular expressions var text = "testing: 1, 2, 3"; var pattern = /\d+/g; In order to check if the pattern matches, the statement is

Correct Answer is : pattern.test(text)

5. The regular expression to match any one character not between the brackets is __________

Correct Answer is : [^…].

6. What does /[^(]* regular expression indicate?

Correct Answer is : Match zero or more characters that are not open parenthesis

7. What will be the result when non greedy repetition is used on the pattern /a+?b/?

Correct Answer is : Matches the letter b preceded by the fewest number of a’s possible

8. What does the subexpression /java(script)?/ result in?

Correct Answer is : It matches “java” followed by the optional “script”

9. What is the most essential purpose of parantheses in regular expressions?

Correct Answer is : Define subpatterns within the complete pattern

10. The method that performs the search-and-replace operation to strings for pattern matching is _______

Correct Answer is : replace()

11. What would be the result of the following statement in JavaScript using regular expression methods?

Correct Answer is : Returns [“123″,”456″,”789”].

12. Consider the following code snippet var pattern = /Java/g; var text = "JavaScript is more fun than Java!"; var result; while ((result = pattern.exec(text)) != null) { alert("Matched '" + result[0] + "'" +" at position " + result.index +"; next search begins at " + pattern.lastIndex); } What purpose does exec() solve in the above code?

Correct Answer is : Returns the same kind of array whether or not the regular expression has the global g flag

13. How do we define the term Thread?

Correct Answer is : Controlled execution of applications

14. What does the browser do to set up a TCP/IP connection?

Correct Answer is : TCP three-way handshake

15. What does the handshake pass between the browser and the remote server?

Correct Answer is : Synchronize

16. How does the handshake help the server?

Correct Answer is : Both Acknowledge and Accept the attempt

17. What is the purpose of the transport layer?

Correct Answer is : Both TCP and UDP Communication takes place

18. What does the status code 200 indicate?

Correct Answer is : Successful

19. What does the status code 500 indicate?

Correct Answer is : Error in request

20. What does the application layer handle?

Correct Answer is : Top-level communication

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon