

Removed by mod
Removed by mod
Kind of. With hoisting, the compiler/interpreter will find variable declarations and execute them before executing the rest of the code. Hoisting leaves the variables as undefined until the code assigning the value to the variable is executed. Hoisting does not initialize the variables.
For example:
console.log(foo);
var foo;
//Expected output: console logs ‘null’
foo = ‘bar’;
console.log(foo);
var foo;
//Expected output: console logs ‘bar’
console.log(foo === undefined);
var foo;
//Expected output: console logs ‘true’
This means you can essentially write your code with variable declarations at the end, but it will still be executed as though the declarations were at the beginning. Your initializations and value assignments will still be executed as normal.
This is a feature that you should probably avoid because I honestly cannot think of any good use case for it that won’t end up causing confusion, but it is important to understand that every variable within your scope will be declared at the beginning of execution regardless of where it is written within your code.
Eh, this particular screen is kind if misleading. You say you dont see a “skip” or “do not remind again” button, well that’s because those buttons are on the next screen(s) for each individual feature. I’ve gotten this screen a couple times, just click through and you can skip/opt out of all the features. It’s kind of silly, but I think the point is that they want you to look at each new feature individually.
My biggest gripe right now is how often everything goes down. About 6 times out of 10 when I go to load anything on lemmy it is down, confirmed on https://lemmy-world.statuspage.io/
They do share a significant commonality, though; they are both interpreted languages, rather than compiled. Sure, you can compile them, but they are meant to be run interpreted so you can quickly and easily tweak and change things and not have to wait for compilation to see the results. In that regard they are very comparable.
I didn’t see the replies to me, but the person i responded to posted the raw uncensored output of a traceroute from their computer to twitter, and I heavily suggested that they should not do that and should remove or edit their comment.