adplus-dvertising
frame-decoration

Question

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"); });

Posted under JavaScript

Answer: (a).setTimeout(function() { console.log("Hello World"); }, 1000);

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?

Q. The necessary globals of a node are defined under which namespace?

Q. Why does Node not block while waiting for operations to complete?

Q. Which is the method used for registering handlers?

Q. The main purpose of JavaScript in web browser is to

Q. A JavaScript program can traverse and manipulate document content through

Q. The behaviour of the document elements can be defined by

Q. The service(s) that enables networking through scripted HTTP requests is

Q. The HTML5 specification includes

Q. Which of the following are not advanced services?

Q. JavaScript code between a pair of 'script' tags are called

Q. Client-side JavaScript code is embedded within HTML documents in

Q. What is the programming philosophy that argues that content and behaviour should as much as possible be kept separate?

Q. Which of the following communicates with server-side CGI scripts through HTML form submissions and can be written without the use of JavaScript?

Q. Which of the following is a way of embedding Client-side JavaScript code within HTML documents?

Q. When does JavaScript code appear inline within an HTML file?

Q. Which character in JavaScript code will be interpreted as XML markup?

Q. Which is the root element in a HTML document?

Q. What is the code for getting the current time?

Q. What is the code to start displaying the time when document loads?