Let's Talk About If Statements in JavaScript // JavaScript Programming

preview_player
Показать описание
Last week I went over if statements and I wanted to go over them in order to gain a better understanding of them. I think I grasp this concept quite well and hopefully I explained well for anyone that wants to learn if statements and stumbled across my video. Thank you for watching!
-------
Join my Discord:
-------
Follow me on the socials:
-------
-------
Music by: warmkeys. - Feel It All Around

Thanks for watching my video!
Рекомендации по теме
Комментарии
Автор

I want to be just like you when I grow up

TahliaSales
Автор

This is really fun, watching someone learn to code!

If I may, I have a few responses to things you said.

The "|" symbol is typographically called a "vertical line"; to computer people it's often called a "pipe". It's used in Unix command lines to "pipe" the stdout from one command into the stdin of another command.

By the way, be very very careful about your construct
let x = !4;
I don't think that's doing what you think it's doing. It's working, this time, but that's by coincidence. I would actually be very interested in finding out *what* exactly is stored in the variable x when you do this assignment.


I think you think this is a logical "not" operator. I'm guessing, though, the Java engine is interpreting it as a bitwise not operator. So in other words, the exclamation point is transforming the 4 into the twos-complement of 4, which is some enormous number. Which is fine for this particular case, because you don't care here what it is, just that it's not equal to 4. But if you do care what it is, then you'll want to know what the operator is actually doing.

Ok, I just left two huge comments. If I'm being a pest, let me know, and I'll leave you alone. This is really cool that you're showing your learning process.

Thanks for the video. Good luck!

fsodn