terence.Hansen94 answered on April 3rd 20 at 18:51
x, y, z, a is not an array, it can't fold.
when manipulating the string as an array you get a string, not a int
da= x + y + z + a or try to convert using parseInt
brad34 answered on April 3rd 20 at 18:53
You variables are initialized immediately when input empty, there is correspondingly undefined
Then you try to add 2 undefined. The second is converted to NaN and it turns out that NaN is displayed
On each click, see values.