Correct Answer: (function(window,document,undefined) { // code... })(this,this.document);
Explanation:
Note: This Question is unanswered, help us to find answer for this one
JavaScript Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More JavaScript MCQ Questions
What's the output? and why? (function(){ var a = b = 3; })(); console.log('a defined? ' + (typeof a !== 'undefined')); console.log('b defined? ' + (typeof b !== 'undefined'));
What the problem with the code ? function runner() { this.run = function() {} }; var runnerCollection = new Array(); for(var i = 0 ; i < 1000 ; i ++) { runnerCollection.push(new runner()); }
What does Date() for example return ?
What's the output? console.log({} + {});
function base(callback){ callback.call({msg:'hi'}) } function message(){ alert(this.msg) }; base(message); which is the value of alert?
What's the output? public class Test15 { public static void main(String[] args) { VO a = new VO(2); VO b = new VO(3); swapONE(a, b); print(a, b); swapTWO(a, b); print(a, b); } private static void print(VO a, VO b) { System.out.print(a.toString() + b.toString()); } public static void swapONE(VO a, VO b) { VO tmp = a; a = b; b = tmp; } public static void swapTWO(VO a, VO b) { int tmp = a.x; a.x = b.x; b.x = tmp; } } class VO { public int x; public VO(int x) { this.x = x; } public String toString() { return String.valueOf(x); } }
var p = {'p1': 'value1', 'p2': 'value2', 'p3': 'value3' }; Which produces the following output? output: p2 = value2
Correct syntax for using the JavaScript exec() object method?
Which code snippet removes objects from an associative array?
Which one shows the correct result for the code below? var arr = []; arr[0] = 'Jani'; arr[1] = 'Hege'; arr[2] = 'Stale'; arr[3] = 'Kai Jim'; arr[4] = 'Borge'; console.log(arr.join()); arr.splice(2, 0, 'Lene'); console.log(arr.join());