You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FRONT: "What is variable hoisting in JavaScript? What are the issues that can arise with this?"
BACK: "Variables and functions may be available before they are declared. The javascript [sic] interpreter looks ahead to all variables that are to be declared in a function and hoists them to the top. Problems occur when you have variables of the same name inside and outside of a function."
I tested this:
console.log(derp);
const derp = 16;
And it gave me this:
console.log(derp);
^
ReferenceError: Cannot access 'derp' before initialization
at Object.<anonymous> (C:\Users\Choppy\Documents\Clutter\Coding\practice\hoisting\index.js:1:13)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
It only semi worked with var, but then it logged undefined.
Hoisting for variables works differently than for functions, and it'd be cool to suggest this to the creator.
The text was updated successfully, but these errors were encountered:
I love this idea! This is what I was initially thinking with the chat feature on the deck page, so you can send a message to the owner, but if you think a more dedicated feature is necessary, I'd be more than willing to implement it.
What about a comment section for each card? On the deck page, you'll be able to see comments on the cards, and on the review page, you can also see comments. This way, not only can you suggest ideas, but you can also talk about what's on the card!
In the meantime, I can transfer the deck to you so you can make any necessary changes now or in the future. I just need to know the email you used for your account, you can send it to [email protected].
For instance:
https://memorize.ai/d/jT6p_r2rkR/web-development-interview-questions
FRONT: "What is variable hoisting in JavaScript? What are the issues that can arise with this?"
BACK: "Variables and functions may be available before they are declared. The javascript [sic] interpreter looks ahead to all variables that are to be declared in a function and hoists them to the top. Problems occur when you have variables of the same name inside and outside of a function."
I tested this:
And it gave me this:
It only semi worked with
var
, but then it loggedundefined
.Hoisting for variables works differently than for functions, and it'd be cool to suggest this to the creator.
The text was updated successfully, but these errors were encountered: