Finastra Interview Question

how does scope work in javascript