Coercion happens when you try to join two different values (values like string and Number) together e.g
When you something like this
let age = 12;
let myName = "dovey";
const result=age + myName;
console.log(result)
the result would be 12dovey javascript engine noticed that they both are not of the same value and can not be joined together to get an appropriate mean so it had to coerced i.e forcefully joining them together to get a result.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Coercion happens when you try to join two different values (values like string and Number) together e.g
When you something like this
let age = 12;
let myName = "dovey";
const result=age + myName;
console.log(result)
the result would be 12dovey javascript engine noticed that they both are not of the same value and can not be joined together to get an appropriate mean so it had to coerced i.e forcefully joining them together to get a result.