To solve your damage and buggy output problems, you need to remove the for/loop at line 178 leaving line 179 as is.
Why? Every enemy bullet pushed to the bulletsE array when the condition is met at line 177 will have the same x and y coordinates and of course, the number of enemy bullets pushed depends on the length of the enemies array.
If there are 50 enemy ships, when the condition is met, 50 enemy bullets with the same coordinates will be added to the bulletsE array. So what looks like a single bullet fired from an enemy ship is, in this case, actually 50 enemy bullets. And every one of them is counted as damage when they collide with the player's ship.
You can control the number of enemy bullets drop by adjusting the number in the conditional at line 177