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

165
Views
How to solve this problem using Javascript

In weather.dat there are data with meteorological surveys. The first column contains the day of the month, while the second and the third contain respectively the temperature maximum and minimum for that day. Write a program that, given the input file, returns the day with the smallest temperature range.

this is the link of a the data displayed in Atom:

The file that contains these data has a .dat extension, I have never used it so far so I don't even know how should I retrieve these data in my script! (should I rewrite them directly in the arrays?)

Please help!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In general files are separated into txt and binary files so extracting data is general for these two file types. File extensions are often used just for clarification.

How to extract data from a txt(.dat) file
Javascript file reader

As well idea for the given task:

  • Save days into a collection (optional)
  • Iterate over the collection of days
  • Calculate the temperature range for each day (Max - Min)
  • Find the min value
about 4 years ago · Juan Pablo Isaza Report
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!