logo
  • Home
  • About
  • Training
  • Programming
  • CS
  • IT
  • IS
  • ECE
  • EEE
  • EE
  • Civil
  • Mechanical
  • Chemical
  • Metallurgy
  • Instrumentation
  • Aeronautical
  • Aerospace
  • Biotechnology
  • Agriculture
  • MCA
  • BCA
  • Internship
  • Contact

JavaScript Multiple Choice Questions | MCQs | Quiz

Javascript Interview Questions and Answers
Pratice Javascript questions and answers for interviews, campus placements, online tests, aptitude tests, quizzes and competitive exams.

Get Started

•   Lexical Structure
•   Types, Values & Variables
•   Expressions & Operators
•   Statements
•   JavaScript Loops
•   Object Attributes
•   Array & Related Methods
•   Invoking Functions
•   Functional Programming
•   Closures
•   JavaScript Classes
•   Augmentation of Classes
•   JavaScript Modules
•   Pattern Matching
•   JavaScript Subsets
•   JavaScript Extentions
•   Shorthand Functions
•   Server-Side JavaScript
•   Scripting Java - Rhino
•   Asynchronous I/O - Rhino
•   Client-Side JavaScript
•   Embedding JavaScript
•   JavaScript-Web Browsers-1
•   JavaScript-Web Browsers-2
•   Client-Side Frameworks
•   Document Object Model
•   Window Object
•   Error Handling - 1
•   Error Handling - 2
•   Scripting Documents
•   Scripting CSS
•   Handling Events
•   Mouse Events
•   Text Events
•   Drag & Drop Events
•   Keyboard Events
•   Node Operations - 1
•   Node Operations - 2
•   Cookies
•   Scripted HTTP
•   The jQuery Library
•   Client-Side Storage
•   Client-Side Databases
•   Scripted Media
•   Graphics
•   Browser Rendering - 1
•   Browser Rendering - 2
•   JavaScript Performance - 1
•   JavaScript Performance - 2
•   JavaScript - FireBug
•   JavaScript - YSlow
•   JavaScript - WebPagetest
•   JavaScript Minification - 1
•   JavaScript Minification - 2
•   Web Sockets
•   JavaScript History
•   Getting Started with R - 1
•   Getting Started with R - 2
•   Getting Started with R - 3
•   Enhanced JavaScript with R
•   WebPagetest API Access
•   Configuration File Creation
•   Parsing Values - 1
•   Parsing Values - 2
•   JavaScript Benchmarking-1
•   JavaScript Benchmarking-2
•   Public API Crafting
•   Remote Logging
•   Object Invocation
•   PerfLogger Performance
•   Navigation & Memory - 1
•   Navigation & Memory - 2
•   BottleNecks Optimization
•   Script Loading - 1
•   Script Loading - 2
•   Lazy Loading - 1
•   Lazy Loading - 2
•   Cache Variable & Properties
•   Closure Compiler
•   Web Workers
•   JavaScript Blobs
•   JavaScript & Memory Leak
•   External JavaScript & PHP
•   HTML APIs
•   HTML DOM
•   Animation
•   Validation
•   Image Map
•   Debugging Forms
•   JavaScript vs Frameworks-1
•   JavaScript vs Frameworks-2

Best Reference Books

Javascript Books
« Prev Page
Next Page »

JavaScript Questions & Answers – Asynchronous I/O with Rhino

Posted on August 29, 2013 by Manish

This set of Javascript Multiple Choice Questions & Answers (MCQs) focuses on “Asynchronous I/O with Rhino”.

1. Which is a fast C++ based JavaScript interpreter?
a) Node
b) Sockets
c) Processors
d) Closures
View Answer

Answer: a
Explanation: Node is a fast C++-based JavaScript interpreter with bindings to the low-level Unix APIs for working with processes, files, network sockets, etc., and also to HTTP client and server APIs.

2. Why does the Node rely on event handlers?
a) APIs are synchronous
b) APIs are asynchronous
c) APIs are reusable
d) None of the mentioned
View Answer

Answer: b
Explanation: Because the APIs are asynchronous, Node relies on event handlers, which are often implemented using nested functions and closures.

3. What is the command to run the node programs?
a) node(program.js)
b) program.js
c) node program.js
d) node.program.js
View Answer

Answer: c
Explanation: The node programs can be run with the command:
node program.js

4. What is the alternative command used in Node for load()?
a) store()
b) module()
c) log()
d) require()
View Answer

Answer: d
Explanation: Use require() instead of load(). It loads and executes (only once) the named module, returning an object that contains its exported symbols.

5. What is the command used for debugging output in Node?
a) print();
b) console.log(…);
c) debug(…);
d) execute(…);
View Answer

Answer: b
Explanation: Node defines console.log() for debugging output like browsers do.

6. What is the code to print hello one second from now?

a) setTimeout(function() { console.log("Hello World"); }, 1000);
b) setTimeout(function() { 1000, console.log("Hello World"); });
c) setTimeout(function(1000) { console.log("Hello World"); });
d) setTimeout(function() { console.log("Hello World"); });
View Answer
Answer: a
Explanation: The above code snippet says hello one second from now.
 
 

7. Among the below given functions, Node supports which of the following client-side timer functions?
a) getInterval()
b) Interval()
c) clearTime()
d) clearTimeout()
View Answer

Answer: d
Explanation: Node supports the client-side timer functions set setTimeout(), setInterval(), clearTimeout(), and clearInterval().

8. The necessary globals of a node are defined under which namespace?
a) variables
b) system
c) process
d) using
View Answer

Answer: c
Explanation: Node defines other important globals under the process namespace.

9. Why does Node not block while waiting for operations to complete?
a) Static
b) Asynchronous
c) Synchronous
d) None of the mentioned
View Answer

Answer: b
Explanation: Because Node’s functions and methods are asynchronous, they do not block while waiting for operations to complete.

10. Which is the method used for registering handlers?
a) on()
b) register()
c) add()
d) include()
View Answer

Answer: a
Explanation: Node objects that generate events (known as event emitters) define an on() method for registering handlers.

Sanfoundry Global Education & Learning Series – Javascript Programming.

To practice all areas of Javascript, here is complete set of 1000+ Multiple Choice Questions and Answers on Javascript.
« Prev Page - JavaScript Questions & Answers – Scripting Java with Rhino
» Next Page - JavaScript Questions & Answers – Client-Side JavaScript
« JavaScript Questions & Answers – Scripting Java with Rhino
JavaScript Questions & Answers – Client-Side JavaScript »

Deep Dive @ Sanfoundry:

  1. Simple C Programs
  2. C Programming Examples on Strings
  3. C Programming Examples on Trees
  4. C Programming Examples on Arrays
  5. C# Programming Examples on Delegates
  6. C# Programming Examples on Functions
  7. C Programming Examples on Linked List
  8. C Programming Examples on File Handling
  9. C Tutorials
  10. Javascript Questions and Answers
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer and SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage & Cluster Administration, Advanced C Programming, SAN Storage Technologies, SCSI Internals and Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him below:
LinkedIn | Facebook | Twitter | Google+

Best Careers

Developer Tracks
SAN Developer
Linux Kernel Developer
Linux Driver Developer
Linux Network Developer

Live Training Photos
Mentoring
Software Productivity
GDB Assignment
Sanfoundry is No. 1 choice for Deep Hands-ON Trainings in SAN, Linux & C, Kernel Programming. Our Founder has trained employees of almost all Top Companies in India such as VMware, Citrix, Oracle, Motorola, Ericsson, Aricent, HP, Intuit, Microsoft, Cisco, SAP Labs, Siemens, Symantec, Redhat, Chelsio, Cavium, ST-Micro, Samsung, LG-Soft, Wipro, TCS, HCL, IBM, Accenture, HSBC, Mphasis, Tata-Elxsi, Tata VSNL, Mindtree, Cognizant and Startups.

Best Trainings

SAN I - Technology
SAN II - Admin
Linux Fundamentals
Advanced C Training
Linux-C Debugging
System Programming
Network Programming
Linux Threads
Kernel Programming
Kernel Debugging
Linux Device Drivers

Best Reference Books

Computer Science Books
Algorithm & Programming Books
Electronics Engineering Books
Electrical Engineering Books
Chemical Engineering Books
Civil Engineering Books
Mechanical Engineering Books
Industrial Engineering Books
Instrumentation Engg Books
Metallurgical Engineering Books
All Stream Best Books

Questions and Answers

1000 C Questions & Answers
1000 C++ Questions & Answers
1000 C# Questions & Answers
1000 Java Questions & Answers
1000 Linux Questions & Answers
1000 Python Questions
1000 PHP Questions & Answers
1000 Hadoop Questions
Cloud Computing Questions
Computer Science Questions
All Stream Questions & Answers

India Internships

Computer Science Internships
Instrumentation Internships
Electronics Internships
Electrical Internships
Mechanical Internships
Industrial Internships
Systems Internships
Chemical Internships
Civil Internships
IT Internships
All Stream Internships

About Sanfoundry

About Us
Copyright
TOS & Privacy
Jobs
Bangalore Training
Online Training
SAN Training
Developers Track
Mentoring Sessions
Contact Us
Sitemap
© 2011 Sanfoundry