I don't know what is the output of this and how the flows go to solve it
console.log(60+"20" - 20*20);
JS implicitly converts
number + string = string
Therefore, 60+"20" = "60"+"20" = "6020"
let a = "60"+20;
console.log(a, typeof a)
Then, JS implicitly converts
string - number = number
Therefore, "6020" - 20*20 = "6020" - 400 = 6020-400 = 5620
let a = "6020" - 20*20;
console.log(a, typeof a)
Note: You can check datatype as well of each result for clarity of each result after conversion
Well it gets processed as follows:
60+"20" becomes 6020
20*20 = 400
6020-400 = 5620
output : 5620
20*20 = 400 ->1st
60+'20' = 6020 -> 2nd
6020 - 400 = 5620 -> 3rd