Casting an obeject in javascript | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Casting an obeject in javascript

As I know we can not cast an object in javascript, but is there any other way around it?

22nd Nov 2020, 7:06 AM
Khaled ^^ Ų®Ų§Ł„ŲÆ Ų§Ł„Ł‚Ų±ŁŠŲ“ŁŠā€Ž
Khaled ^^ Ų®Ų§Ł„ŲÆ Ų§Ł„Ł‚Ų±ŁŠŲ“ŁŠā€Ž - avatar
1 Resposta
+ 5
Other way around what? You should provide an example. We can explicitly convert values to a certain type in JavaScript. E.g: var s = "25" var n = Number(s) But this depends on the types involved. Can you share the code where you need to "cast" an object?
23rd Nov 2020, 4:34 AM
Kevin ā˜