Question
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"); });
Posted under JavaScript
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the code to print hello one second from now?
Similar Questions
Discover Related MCQs
Q. Among the below given functions, Node supports which of the following client-side timer functions?
View solution
Q. The necessary globals of a node are defined under which namespace?
View solution
Q. Why does Node not block while waiting for operations to complete?
View solution
Q. Which is the method used for registering handlers?
View solution
Q. The main purpose of JavaScript in web browser is to
View solution
Q. A JavaScript program can traverse and manipulate document content through
View solution
Q. The behaviour of the document elements can be defined by
View solution
Q. The service(s) that enables networking through scripted HTTP requests is
View solution
Q. The HTML5 specification includes
View solution
Q. Which of the following are not advanced services?
View solution
Q. JavaScript code between a pair of 'script' tags are called
View solution
Q. Client-side JavaScript code is embedded within HTML documents in
View solution
Q. What is the programming philosophy that argues that content and behaviour should as much as possible be kept separate?
View solution
Q. Which of the following communicates with server-side CGI scripts through HTML form submissions and can be written without the use of JavaScript?
View solution
Q. Which of the following is a way of embedding Client-side JavaScript code within HTML documents?
View solution
Q. When does JavaScript code appear inline within an HTML file?
View solution
Q. Which character in JavaScript code will be interpreted as XML markup?
View solution
Q. Which is the root element in a HTML document?
View solution
Q. What is the code for getting the current time?
View solution
Q. What is the code to start displaying the time when document loads?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond JavaScript? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!