Implement the function divideBy(divisor).

It should accept a divisor and return a function that takes the number n, divides it by the divisor and returns the the result.

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

functions.js

export const divideBy = (divisor) => {
  return () => {

  };
}

solution.js

/**
 * Implement the function divideBy(divisor)
 *
 * It should accept a number **divisor** and return a function that takes another number **n**
 * and divides it by the **divisor**.
 * */

import { divideBy } from './functions.js';

const divideBy2 = divideBy(2);
const divideBy5 = divideBy(5);

console.log(divideBy2(10));
console.log(divideBy2(20));
console.log(divideBy5(10));
console.log(divideBy5(20));