Exercise on Symbols

The exercises below will give you a deeper understanding of symbol along with the pros and cons of using them.

Exercise 1:

What are the pros and cons of using an underscore prefix for expressing our intention that a field is private? Compare this approach with symbols!

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.