I'm am very new to programming and I am trying to solve a problem where I have to convert an array of Fahrenheit values, to Celsius. Though I am not too sure where to start with .map and I would really appreciate some help in understanding how to solve this problem.
This was my first attempt in trying to solve the test problem.
function convertTemps(array) {
return array * (9/5) + 32
}
These are the problems I am trying to solve
describe('convertTemps', () => {
it('should convert farenheit to celcius for all temperatures in the array', () => {
expect(convertTemps([23, 140, 212, 41])).to.deep.equal([-5, 60, 100, 5])
expect(convertTemps([-58, -22, -4, 14])).to.deep.equal([-50, -30, -20, -10])
expect(convertTemps([104, 122, 158, 176])).to.deep.equal([40, 50, 70, 80])
})
})