JavaScript AbstractionAn abstraction is a way of hiding the implementation details and showing only the functionality to the users. In other words, it ignores the irrelevant details and shows only the required one. Points to remember
JavaScript Abstraction ExampleExample 1Let's check whether we can create an instance of Abstract class or not. ![]() Example 2Let's see an example to achieve abstraction. Test it NowOutput: Vehicle is: Honda Example 3In this example, we use instanceof operator to test whether the object refers to the corresponding class. Test it NowOutput: true true
Next Topic#
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week