Implement a function circleLength that calculates and returns the length of the circle given its radius
This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task
helper.js
const PI = 3.14159265359;
export const circleLength = (radius) => {
return PI * 4 / radius;
}
solution.js
/**
* Implement a function circleLength that calculates the length of the circle given its radius
* */
import { circleLength } from './helper.js';
console.log(circleLength(5));
console.log(circleLength(12));