The Rolling Scopes School is widely known for its difficult curriculum that takes a lot of time. It usually takes 800 hours to master the JavaScript language, its ecosystem and related tools. About 500 hours are required to learn pretty basic programming (loops, if-else operators (flow of control), basic data structures and algorithms) from scratch.
Your task is to implement the getTimeForEducation
function that calculates how many weeks the education process would take under given conditions. The function should take the current student priority as string and config of how quickly student can study. The function should return the amount of weeks required to complete the course.
For example:
// education time config
const speedConfig = {
family: 4,
friends: 10,
normal_life: 20,
profession: 30
carrier: 40,
top_peformance: 60
}
const knowsProgramming = true;
let weeks = getTimeForEducation('family', true, speedConfig);
console.log(weeks); //
Write your code in `src/index.js. All test cases are designed as “error-free”, so don't worry about handling any errors.
- Install Node.js
- Fork this repository: https://github.com/davojta/js-edu
- Clone your newly created repo: https://github.com/<%your_github_username%>/js-edu/
- Go to folder
js-edu
- To install all dependencies use
npm install
- Run
npm test
in the command line - You will see the number of passing and failing tests you 100% of passing tests is equal to 100p in score
Submit to rs app
- Open rs app and login
- Go to submit task page
- Select your task (js-edu)
- Press the submit button and enjoy