Understanding Type Conversion in Javascript


JavaScript engine automatically converts types from one to another as needed (“type coercion”).

Source Code

let result = "3" + 2; // "32", number 2 is converted to a string
console.log(result);
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments