Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

138
Vistas
Trying to add numbers from an a array?

im getting a output of the temperature i entered instead of getting the sum. im trying to get both the total f and c. I tried making totalf and totalc arrays instead of var. I dont know if returning the value would help?

var totalf=0;
    var totalc=0;
    
    
      var output = [fahrenheit,"      ",celsius+ '\r\n']; 
        for(var i = 0; i < output. length ; i++){
          totalf+=fahrenheit[i];
          totalc+=celsius[i];
          console.log(totalf[i],totalc[i]);
        }

tried doing this

function average() {
sum=0;
  for (let i = 0; i < document.getElementById('chart').value.length; i++) {
    sum +=  document.getElementById('chart').value(output[fahrenheit]);
     document.getElementById('chart').value=sum;
}
about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda