No, of course not. You have said that ampere must be exactly the same as the string '0', but it is a number 0 so it does not match. As I said earlier it should be
if (ampere === 0 && watt === 0)
No, of course not. You have said that ampere must be exactly the same as the string '0', but it is a number 0 so it does not match. As I said earlier it should be
if (ampere === 0 && watt === 0)