Micro1 interview question

there was a coding question for JavaScript (node.js) language