Skip to main content
deleted 4 characters in body
Source Link
Jeremy Banks Mod
  • 129.5k
  • 12
  • 67
  • 95

More Objectively-BadProblematic JavaScript Assessment Items

Which of these is NOT a type of Error?

  1. InternalError
  2. RangeError
  3. EvalError
  4. ControlFlowError

Pluralsight's Answer

  1. ControlFlowError

My Comments:

This question has an incorrect answer.

InternalError is also not defined in browsers or defined the ECMAScript specification, and so should also be a valid answer.

Which is the proper way to do prototypal inheritance?

  1. function superclass() {this.stuff="stuff";}
     function subclass() {subclass.prototype = new superclass();}
  2. function superclass() {this.stuff="stuff";}
     function subclass(superclass) {}
  3. function superclass() {this.stuff="stuff";}
     function subclass() {}
     subclass.prototype = new superclass();
  4. function superclass() {this.stuff="stuff";}
     var subclass = new superclass();

Pluralsight's Answer:

  1. function superclass() {this.stuff="stuff";}
     function subclass() {}
     subclass.prototype = new superclass();

My Comments:

None of these answers is correct.

To the extent that this was ever a correct answer, that ended in ES5 (published in 2009) with the addition of Object.create(), which is a cleaner way to set up a prototype. But even prior to that, a general solution to setting up prototypical inheritance requires this dummy constructor dance, which Pluralsight does not provide as an option.

How do you remove an object from the global scope?

  1. You can't remove an object from the global scope.
  2. Assign it to null
  3. Memory management will remove it automatically if not referenced.
  4. Use the delete keyword

Pluralsight's Answer:

  1. You can't remove an object from the global scope.

My Comments:

This question has ambiguous/incorrect wording.

The question doesn't ask "how do you remove a binding", or "a variable", or "an assignment" from the global scope, it asks how you remove "an object". And you could indeed detach "an object" from the global scope by "2. Assigning it to null" and then "3. Memory management will remove it automatically if not referenced".

Aside

Pluralsight IQ is roughly linearly-distributed.
Traditional IQ is roughly normally-distributed.

More Objectively-Bad JavaScript Assessment Items

Which of these is NOT a type of Error?

  1. InternalError
  2. RangeError
  3. EvalError
  4. ControlFlowError

Pluralsight's Answer

  1. ControlFlowError

My Comments:

This question has an incorrect answer.

InternalError is also not defined in browsers or defined the ECMAScript specification, and so should also be a valid answer.

Which is the proper way to do prototypal inheritance?

  1. function superclass() {this.stuff="stuff";}
     function subclass() {subclass.prototype = new superclass();}
  2. function superclass() {this.stuff="stuff";}
     function subclass(superclass) {}
  3. function superclass() {this.stuff="stuff";}
     function subclass() {}
     subclass.prototype = new superclass();
  4. function superclass() {this.stuff="stuff";}
     var subclass = new superclass();

Pluralsight's Answer:

  1. function superclass() {this.stuff="stuff";}
     function subclass() {}
     subclass.prototype = new superclass();

My Comments:

None of these answers is correct.

To the extent that this was ever a correct answer, that ended in ES5 (published in 2009) with the addition of Object.create(), which is a cleaner way to set up a prototype. But even prior to that, a general solution to setting up prototypical inheritance requires this dummy constructor dance, which Pluralsight does not provide as an option.

How do you remove an object from the global scope?

  1. You can't remove an object from the global scope.
  2. Assign it to null
  3. Memory management will remove it automatically if not referenced.
  4. Use the delete keyword

Pluralsight's Answer:

  1. You can't remove an object from the global scope.

My Comments:

This question has ambiguous/incorrect wording.

The question doesn't ask "how do you remove a binding", or "a variable", or "an assignment" from the global scope, it asks how you remove "an object". And you could indeed detach "an object" from the global scope by "2. Assigning it to null" and then "3. Memory management will remove it automatically if not referenced".

Aside

Pluralsight IQ is roughly linearly-distributed.
Traditional IQ is roughly normally-distributed.

More Problematic JavaScript Assessment Items

Which of these is NOT a type of Error?

  1. InternalError
  2. RangeError
  3. EvalError
  4. ControlFlowError

Pluralsight's Answer

  1. ControlFlowError

My Comments:

This question has an incorrect answer.

InternalError is also not defined in browsers or defined the ECMAScript specification, and so should also be a valid answer.

Which is the proper way to do prototypal inheritance?

  1. function superclass() {this.stuff="stuff";}
     function subclass() {subclass.prototype = new superclass();}
  2. function superclass() {this.stuff="stuff";}
     function subclass(superclass) {}
  3. function superclass() {this.stuff="stuff";}
     function subclass() {}
     subclass.prototype = new superclass();
  4. function superclass() {this.stuff="stuff";}
     var subclass = new superclass();

Pluralsight's Answer:

  1. function superclass() {this.stuff="stuff";}
     function subclass() {}
     subclass.prototype = new superclass();

My Comments:

None of these answers is correct.

To the extent that this was ever a correct answer, that ended in ES5 (published in 2009) with the addition of Object.create(), which is a cleaner way to set up a prototype. But even prior to that, a general solution to setting up prototypical inheritance requires this dummy constructor dance, which Pluralsight does not provide as an option.

How do you remove an object from the global scope?

  1. You can't remove an object from the global scope.
  2. Assign it to null
  3. Memory management will remove it automatically if not referenced.
  4. Use the delete keyword

Pluralsight's Answer:

  1. You can't remove an object from the global scope.

My Comments:

This question has ambiguous/incorrect wording.

The question doesn't ask "how do you remove a binding", or "a variable", or "an assignment" from the global scope, it asks how you remove "an object". And you could indeed detach "an object" from the global scope by "2. Assigning it to null" and then "3. Memory management will remove it automatically if not referenced".

Aside

Pluralsight IQ is roughly linearly-distributed.
Traditional IQ is roughly normally-distributed.

Source Link
Jeremy Banks Mod
  • 129.5k
  • 12
  • 67
  • 95

More Objectively-Bad JavaScript Assessment Items

Which of these is NOT a type of Error?

  1. InternalError
  2. RangeError
  3. EvalError
  4. ControlFlowError

Pluralsight's Answer

  1. ControlFlowError

My Comments:

This question has an incorrect answer.

InternalError is also not defined in browsers or defined the ECMAScript specification, and so should also be a valid answer.

Which is the proper way to do prototypal inheritance?

  1. function superclass() {this.stuff="stuff";}
     function subclass() {subclass.prototype = new superclass();}
  2. function superclass() {this.stuff="stuff";}
     function subclass(superclass) {}
  3. function superclass() {this.stuff="stuff";}
     function subclass() {}
     subclass.prototype = new superclass();
  4. function superclass() {this.stuff="stuff";}
     var subclass = new superclass();

Pluralsight's Answer:

  1. function superclass() {this.stuff="stuff";}
     function subclass() {}
     subclass.prototype = new superclass();

My Comments:

None of these answers is correct.

To the extent that this was ever a correct answer, that ended in ES5 (published in 2009) with the addition of Object.create(), which is a cleaner way to set up a prototype. But even prior to that, a general solution to setting up prototypical inheritance requires this dummy constructor dance, which Pluralsight does not provide as an option.

How do you remove an object from the global scope?

  1. You can't remove an object from the global scope.
  2. Assign it to null
  3. Memory management will remove it automatically if not referenced.
  4. Use the delete keyword

Pluralsight's Answer:

  1. You can't remove an object from the global scope.

My Comments:

This question has ambiguous/incorrect wording.

The question doesn't ask "how do you remove a binding", or "a variable", or "an assignment" from the global scope, it asks how you remove "an object". And you could indeed detach "an object" from the global scope by "2. Assigning it to null" and then "3. Memory management will remove it automatically if not referenced".

Aside

Pluralsight IQ is roughly linearly-distributed.
Traditional IQ is roughly normally-distributed.