I keep getting an error when I Submit task:
- Function circleLength should return the length of the circle given the radius
I haven't change anything because I can't find any errors: (helper.js)
const PI = 3.14159265359;
export const circleLength = (radius) => {
return PI * 4 / radius;
}
When I press Run your code I get two numbers: (solution.js)
import { circleLength } from './helper.js';
console.log(circleLength(5));
console.log(circleLength(12));
Is it the variable PI that starts with a capital letter? I changed it and still got the error.
Is it the math that is wrong (PI * 4 / radius)? If it's that I'm really going to need your help 🤣
Can you help me find the problem?