Which of the following code snippets removes objects from an associative array?
Correct Answer: delete array["propertyName"];
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
Correct syntax for using the JavaScript exec() object method?
var p = {'p1': 'value1', 'p2': 'value2', 'p3': 'value3' }; Which produces the following output? output: p2 = value2
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); } }
The following codes are for comparing equality operators '==' and '===' in JavaScript. Which are the correct results?
Which method evaluates a string of JavaScript code in the context of the specified object?
What does Date() for example return ?
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's the output? and why? (function(){ var a = b = 3; })(); console.log('a defined? ' + (typeof a !== 'undefined')); console.log('b defined? ' + (typeof b !== 'undefined'));
Which one is a valid syntax for a self-invokink fucntion?
What is newRay equal to at the end of the following code? var ray = []; ray['0'] = 1; ray['x'] = 2; var newRay = [] for( var i in ray ) { newRay.push( ray[ i ] ); }