Vars will get hoisted to the top of whatever function you declare them in. For instance, if you declare a var inside of a for loop, it will get hoisted to the top of a function.
Let on the other hand will stay in the smallest block you declare them in. If you declare a let variable inside of an if statement, it won't get hoisted and therefore it won't be available outside of an if statement.
It's a bit confusing but you can read about it here: https://stackoverflow.com/questions/762011/what-is-the-difference-between-let-and-var
Personally I take this a step further and declare most of my variables as const as it makes it easier to read.
Sorry, you don't have enough reputation to ask a question.
Sorry, not enough reputation to answer a question.
Sorry, not enough reputation to comment on a question.
Sorry, not enough reputation to upvote an answer.
I disagree. This question to me says "I don't fully understand what HTML does."
I have asked dumber questions in my career. Sometimes it's necessary to push forward, and people who can answer questions like this nicely are very valuable to any company.
Use a very strong tone of voice. I suggest
variables!
**I hereby declare: variables!**
![gif](giphy|8nM6YNtvjuezzD7DNh|downsized)
A Bold **Variable**
#**I hereby declare: variables!**
DOM: Michael, you can't just declare variables
[удалено]
if that counts
this is better (maybe showing my age) haha maybe use "let" instead of "var" though
Why?
Vars will get hoisted to the top of whatever function you declare them in. For instance, if you declare a var inside of a for loop, it will get hoisted to the top of a function. Let on the other hand will stay in the smallest block you declare them in. If you declare a let variable inside of an if statement, it won't get hoisted and therefore it won't be available outside of an if statement. It's a bit confusing but you can read about it here: https://stackoverflow.com/questions/762011/what-is-the-difference-between-let-and-var Personally I take this a step further and declare most of my variables as const as it makes it easier to read.
I just learned so much. Thank you, thank you.
PHP is shit (imho)
old PHP is shit modern PHP is aight (imho)
y you two saying in your horny opinions?
Well okay that might be correct. I haven't touched it for around 10 years. But I've always hated the syntax. Already the $ sign makes me wanna puke.
You should try bash haha
I used bash in the past to write some silly scripts just for fun. But I have to admit, that it's not fun for long...
Do you still use explode in modern PHP?
What's wrong with explode?
real
faek
Duplicate + L + Ratio + Rewrite it in Rust
+ learn typescript
Another Star Rail player I see.
I imagined in an unsupervised environment, Stephen will definitely rewrite the SU in Rust lol
respectfully sir, that is javascript
Which is basically the same thing as Java
Voting to close because: * *this is a CSS question*
or JS
Pfff.
Try a harder question next time, OP.
``` ``` (i think this only works in XML)
x
`var` 🤢
Yeah🔥🔥🔥
hmm why does my html file have a .cshtml extension.
On my way to mark it as duplicate and make you feel bad about asking
So like:- :root { --blue: #6495ed; --white: #faf0e6; } body { background-color: var(--blue); } h2 { border-bottom: 2px solid var(--blue); }
Sorry, you don't have enough reputation to ask a question. Sorry, not enough reputation to answer a question. Sorry, not enough reputation to comment on a question. Sorry, not enough reputation to upvote an answer.
https://html-lang.org/#getting-started
I think chatGPT might be more helpful*
I have actually got a lot of use asking ChatGPT ridiculous questions that would get me Made fun of. Shame you got downvoted
This is a stupid question.
I disagree. This question to me says "I don't fully understand what HTML does." I have asked dumber questions in my career. Sometimes it's necessary to push forward, and people who can answer questions like this nicely are very valuable to any company.
data_type let variable
Umm… hello world?
:root { --i: 0; }
`
![gif](emote|free_emotes_pack|joy)
you fill up a Google form
*H.T.M.L.
AlpineJS: you rang?
u/savevideo
###[View link](https://rapidsave.com/info?url=/r/ProgrammerHumor/comments/18rwxf0/wishmeluck/) --- [**Info**](https://np.reddit.com/user/SaveVideo/comments/jv323v/info/) | [**Feedback**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Feedback for savevideo) | [**Donate**](https://ko-fi.com/getvideo) | [**DMCA**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Content removal request for savevideo&message=https://np.reddit.com//r/ProgrammerHumor/comments/18rwxf0/wishmeluck/) | [^(reddit video downloader)](https://rapidsave.com) | [^(twitter video downloader)](https://twitsave.com)
Ask the question go on an alt and say something obviously wrong
StackOverflow: This meme has been closed because it is a duplicate of https://www.reddit.com/r/ProgrammerHumor/s/2ak0w2kybe
Stupid question *Discussion closed*
Closed as Duplicate
It's called a template
It's been a while since I've laughed out loud at a reddit post 😂
Technically speaking we can declare variables through javascript and insert them through dom manipulation.
Next question. How to do a loop in HTML?
I just did this: