Javascript Questions Asked in Every Interview | PART 1 1. What is the difference between Null and undefined. Ans: Null and undefined are both primitive values in javascript that represents the absence of value. Key difference null is deliberately absence of value while undefined is an uninitialized or non-existing value. 2.How does javascript handle scope and hoisting Ans: Javascript uses a concept called lexical scoping which means that the scope of the variable determined by its position within the source code . Hoisting is a related concept that refers to the process of moving variable declaration at the top of their scope . This means that variable are accessible within their scope even before they are declared.
Download the medial app to read full posts, comements and news.