JavaScript Quiz #10

November 2, 2013 in JavaScript

Assume that we have the following short JavaScript code:

    var y = 10;

    if (!(x in window)) {
        var x = 10;
    } else {


Will this code succeed or fail? and if it succeeds, what is the output of the alerts?

Read the complete answer

Comments are closed.

Skip to toolbar