Abhishek Dandriyalabhishek-dandriyal.hashnode.dev·Apr 10, 2024Functions in JavascriptFunction Expression: A function expression in JavaScript is when you assign a function to a variable. It's an alternative way to define a function compared to the traditional function declaration. In your example: const square = function(num) { r...Discussiife in javascipt
Vikas singh varmavikas369.hashnode.dev·Apr 6, 2024What is Hoisting?Hoisting: Hoisting allows functions and variables(with var) to be used before they are declared. This behavior gives us a peek behind the scenes of how JavaScript works It's a javascript behavior where function and variable declaration (with Var) are...DiscussHoisting
Murali Singhmuralisingh.hashnode.dev·Apr 1, 2024Hoisting in JavaScriptHoisting is a special behavior of the JavaScript interpreter. Hoisting means that function and variable declarations are moved to the top of their containing scope. Variables Hoisting In JavaScript, variables are declared using let, const, and var. A...Discuss·1 like·26 readsclass hoisting
Jemin Kikanijemin.hashnode.dev·Mar 19, 2024Day 9 : Function Declaration ,Expression ,Constructor , Hoisting , Self-invoking FunctionFunction JavaScript functions are defined with the function keyword. You can use a function declaration or a function expression. Function Declaration:- function functionName(parameters) { // code to be executed } Declared functions are not exec...Discussself-invoking function
Ajay Sharmaajaysharma.hashnode.dev·Mar 15, 2024Hoisting in Simple WordsIn simple terms, hoisting is a JavaScript behavior where variable and function declarations are moved to the top of their containing scope during the compilation phase, before the code is actually executed. This means that you can use a variable or c...DiscussHoisitng
Shruti Singhshrutisinghz.hashnode.dev·Feb 2, 2024What is Hoisting in JavaScript?So as we know JavaScript is synchronous by default i.e. JS run line by line. For example, observe the code below and tell the output. function sum(a , b){ return a + b; } console.log(sum(5 , 5)) //Output => 10 How about we declare a variable at l...Discussjavascript hoisting
Oluwafunmikeoluwafunmike.hashnode.dev·Dec 11, 2023A Comprehensive Guide on JavaScript HoistingAs a JavaScript developer, one major concept you will be exposed to is a seemingly subtle mechanism known as hoisting. As simple and easy as this may sound, it could lead to bugs, and errors, and might become quite confusing, especially for beginners...Discuss·1 likeHoisting
Mehak Baharmehakbahar.hashnode.dev·Nov 11, 2023Truths About JavaScript Only EXPERTS KnowA wonderful attribute of JavaScript that I recently came across throughout my learning journey is the ability to call a function in JavaScript code even before it has been declared. But how is this possible? the very concept of "HOISTING"! WHAT IS HO...DiscussHoisting
Prasoon Abhinawblog.pabhinaw.dev·Aug 9, 2023Mastering JavaScript: Unraveling the Power of Web DevelopmentHoisting Hoisting is JavaScript's default behavior of moving declarations to the top. It allows us to call functions before even writing them in our code. Basically, it gives us an advantage that no matter where functions and variables are declared,...Discuss·49 readsJavaScript
Dipto Biswasdiptobiswas.hashnode.dev·Jul 20, 2023Hoisting in JavaScriptIntroduction The concept of hoisting in JavaScript can sometimes be confusing for beginners, but it is asked often in Tech interviews. So let's try to understand hoisting with few simple examples. Hoisting Even before code execution starts, JavaScrip...Discuss·45 readsJavaScript