Generation

generate functionTue, 28 Mar 2023

Dado un número 2 entero positivo se pide eliminar los dígitos que son ceros

Script function funcion(a){ var b = a.length; for(var i = 0; i < b; i++){ if(a[i] == 0){ a.splice(i, 1); b = a.length; i--; } } return a; }

Questions about programming?Chat with your personal AI assistant