Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const imdb = require('../src/imdb_service.js');
- function price(imdbId, fetch_rating) {
- let rating = fetch_rating(imdbId);
- let base_price = 3.95;
- if (rating >= 8) {
- base_price += 1.0;
- }
- if (rating < 4) {
- base_price -= 1.0;
- }
- return base_price;
- }
- module.exports = price;
Add Comment
Please, Sign In to add comment