Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

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

  2. 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

    Workspace

    Answer : Option A

    Explanation :

    The above code snippet says hello one second from now.


Be The First To Comment