1

Here I read this:

Since ES2015, JavaScript has the Map object which is an Object on steroid and can easily be used for caching.

Could someone explain what is the meaning of the bold expression?

3

The meaning of "on steroids" is: In a very large, enhanced, or exaggerated form.

I assume that you know what "object" means, but just to make sure: A structure that combines data and the procedures necessary to operate on that data.

Thus the expression you are asking about (an object on steroids) would be a very powerful and enhanced object in the JavaScript programming language, you would be able to use it to accomplish many things you can't do with simpler objects.

Additionally, as noted below in the comments, the term Object with initial capitals, refers to a specific basic type of object, which is the root of all other descendant objects in the Java and JavaScript languages. In the page you linked it talks about the Map object, which is a different and more powerful type of object than an Object object. As is explained in the documentation, here.

So in this context, it more specifically means that a Map (object) is like a very powerful and enhanced Object (object).

  • Yes, I understand both terms (steroid and object) but the whole expression is new to me, your answer is clear, thank you – Begueradj Feb 25 at 7:03
  • I agree with your definition of steroid but not object. This word has a specific meaning in computer programming but the use of the capital here suggests that this relates to an even more specific use of the word as defined in the Java programming language. – David Robinson Feb 25 at 21:24
  • @DavidRobinson My definition of object is the computer definition, see link in the answer. Correct me if I am wrong, but this definition still applies even if it refers to the Object superclass as the root of the hierarchy in Java. So "an Object" is not an instantiation of this, but a derived class from this superclass. Additionally this in not Java but JavaScript (ES2015) which defined object with the generic definition, and Map is specifically different from Object, see developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/… – ib11 Feb 26 at 1:57
  • Yes, @ib11, I did not read your comment carefully enough. I read "mean" where "mean in this context" would have been clearer for a careless reader like me! But your observation that I confused different languages makes the point that it is really important to get the right one. Not only is it important for programming to understand the definition of terms in the specific language, but the power of objects will vary from language to language and the quote about steroids clearly means that this object is very powerful by the standards of "Objects in JavaScript". – David Robinson Feb 27 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.