What will be the output of the following code? Technology Community › Category: JavaScript › What will be the output of the following code? 0 Vote Up Vote Down VietMX Staff asked 4 years ago Problem var x = 1; var output = (function() { delete x; return x; })(); console.log(output); Above code will output 1 as output. delete operator is used to delete property from object. Here x is not an object it’s global variable of type number.