This should fix the crash that you get.
I'll go a bit further and suggest another thing that might not be working as you expect:
b.deletion();
e.deletion();
...
if(e.toDelete && e.enemiesHealth == 0){
enemies.splice(k, 1);
kills += 1;
}
With this code, if the bullet is the last on the list, or if the enemy is the last on the list being checked, it will not be deleted until the next frame (the next time you iterate over those arrays).
It's not clear why you defer the deletion to later, so I'll suggest you delete the item right away:
function collision(){
for(var l = bullets.length - 1; l >= 0; l--){
var b = bullets[l];
var shouldDeleteBullet = false;
for( var k = enemies.length - 1; k >= 0; k--){
var e = enemies[k];
if(b.x > e.x && b.x < e.x + e.imgWidth/4 && b.y > e.y && b.y < e.y + e.imgHeight/4 ){
e.enemiesHealth -= 50;
if (e.enemiesHealth <= 0){ // This will allow a greater variety of damage eventually
enemies.splice(k, 1);
kills += 1;
}
shouldDeleteBullet = true; // Flag for deletion
break; // The bullet has been consumed, we can no longer use it.
}
}
if (shouldDeleteBullet){
bullets.splice(l, 1);
}
}
}