Smallpdf Interview Question

clousure in javascript