Pulkit Govranipulkitgovrani.hashnode.dev·Jun 2, 2023Hoisting in JavascriptLook at the below code and guess its output: console.log(val); var val; If you have not studied hoisting and if you are learning javascript after learning any other programming language like Java or C++ then your guess will be " that the above code ...1 like·69 readsjavascript hoisting
Pulkit Govranipulkitgovrani.hashnode.dev·Jun 1, 2023Difference between undefined, not defined & null in javascriptThis topic is one of the famous interview questions so therefore we are here to cover this in our blog. Without wasting any time let's move on to the main part. How undefined Work? Undefined is returned by the javascript compiler when a particular va...2 likes·52 readsJavaScript
Pulkit Govranipulkitgovrani.hashnode.dev·May 30, 2023Currying in JavascriptCurrying is a concept where a function with multiple arguments is divided into multiple functions having 1 or 2 arguments. Syntax of Currying Function function multipleargs(arg1, arg2, arg3, arg4) curriedfunction(arg1)(arg2)(arg3)(arg4) There is an...1 like·44 reads#codewithpg
Pulkit Govranipulkitgovrani.hashnode.dev·May 29, 2023Discussion on this keyword in JavascriptIn javascript, this keyword behaves differently compared to other languages. This keyword refers to an object and the manner in which it is called will be responsible for telling which object. Mini Question: What will be the output if we console.log ...50 readsthis keyword in javascript
Pulkit Govranipulkitgovrani.hashnode.dev·May 28, 2023Promise Chaining in JavascriptIn the previous blog, we learned about the basics of promises in javascript. Here is the link if you've missed it: https://pulkitgovrani.hashnode.dev/what-are-promises-in-javascript Now in this blog, we will be learning how promises can handle more t...4 likes·52 readsJavaScript
Pulkit Govranipulkitgovrani.hashnode.dev·May 27, 2023What are Promises in Javascript?If an interviewer asks you "What do you understand by promises"? Then what will be your answer? Here's the cleanest answer from the mdn documentation: " A promise is basically an object which tells the eventual completion or failure of an asynchronou...1 like·54 readsJavaScript
Pulkit Govranipulkitgovrani.hashnode.dev·May 26, 2023Discussion on map, filter and reduce methods in Javascript.Interview Question: If you can guess the output of the below code successfully then you can skip this blog :) Code: let input_array=[1,6,3,7,9,2]; let updated_array=input_array.map((element)=>{ return element<4; }) console.log(updated_array); If...2 likes·40 readsJavaScript