+ 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 Answer
+ 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 â˜