doing the video storage problem
`function numberOfVideos(videoSize, videoUnit, driveSize, driveUnit) {
const units = {
B: 1,
KB: 1000,
MB: 1000 ** 2,
GB: 1000 ** 3,
TB: 1000 ** 4
};
if(![“B”,“KB”,“MB”,“GB”].includes(videoUnit)){
return “Invalid video unit”
}
if(![“GB”,“TB”].includes(driveUnit)){
return “Invalid drive unit”
}
let video = videoSize * units[videoUnit];
let driver = driveSize * units[driveUnit];
return Math.floor(driver / video)
}
console.log(numberOfVideos(500, “MB”, 100, “GB”));
console.log(numberOfVideos(2000, “B”, 1, “TB”))`
the second test case says b is invalid but instructions says b is valid