Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!