Object Conversions

Can anyone pls explain in brief what are the important and necessary object to primitive conversions in brief. or object conversions with egs
10 Replies
ἔρως
ἔρως5mo ago
what do you mean?
Vandana
VandanaOP5mo ago
Thanks for responding. Object to primitive type conversions.
Vandana
VandanaOP5mo ago
GeeksforGeeks
How to convert an object to string using JavaScript ? - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
ἔρως
ἔρως5mo ago
usually, you do it because you need it there's 3 ways to do it: - toString - toValue - Symbol.toPrimitive
Vandana
VandanaOP5mo ago
when do we come across these?
clevermissfox
clevermissfox5mo ago
the example that immediately comes to mind is when we are retrieving and sending data between browser storage and our application. JSON.parse() and JSON.stringify()
Vandana
VandanaOP5mo ago
yea true. and these?
ἔρως
ἔρως5mo ago
you almost never will use these this is a reasonable usage of those, but, even then, it's super specific
Vandana
VandanaOP5mo ago
yup. so no need to worry about these.
ἔρως
ἔρως5mo ago
you should know they exist, but don't worry an awful lot about those
Want results from more Discord servers?
Add your server