Finastra interview question

how does scope work in javascript