Generation

generate functionFri, 12 May 2023

Si todos los elementos del arreglo son iguales, retornar true. // Caso contrario retornar false.

function isUniform(list){ var i = 0; var result = true; while(i < list.length - 1 & result){ if(list[i] === list[i+1]){ result = true; i++; }else{ result = false; break; } } return result; }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant