Multiple choice technology programming languages

It is possible to add custom methods and properties in pre-existing objects like String, Math and others

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

You can add custom methods to built-in constructor prototypes (like String.prototype or Array.prototype), but not to Math which is a static object. However, the statement says 'like String, Math and others' - while String can be extended via prototype, Math cannot be extended the same way. More importantly, modifying built-in prototypes is generally considered bad practice and can cause conflicts.