Deep understanding of javascript