Any function well be work with a number, just make two points. like this : 10..toFixed(x) because the first point is not to reference, for the dozens, like 10.2 or 10.1
Lol.. supervisor chose JS (node) for our project because it's event driven and non I/O blocking, then proceeded to tell us to explicitly use it in a sync manner whilst using external libraries... imagine trying to use an environment and eco system based on async in a synchronized manner.. it's crazy.
Great video! However the problem with a newline after the return keyword is unaffected by the recommendation to "always use semicolons". Even if you write your semicolons, undefined will be returned. The only way to avoid it is to learn to not put return on its own line, and that has nothing to do with semicolons.
Thank for your amazing and passionate work this kind of topic is truly interesting... I am wondering if you plan on doing something about back end like NodeJS one day soon
Working on some Node content for a new course right now. I'm happy to make RUclips videos on it, but it's kind of a large topic so I need suggestions about what in particular to cover!
Colt Steele please 🙏 please 🥺 don’t do like in the 75 Udemy Intro course I have purchased... if you do something NODEJS on your RUclips channel it’s *not* required to be web server stuff again (NodeJs can do way more) please teach us what we can’t get from those tutorials... explain us the real stuff: (streams, piping, buffers, sockets and +CHILD PROCESSES+) all that great stuff we all need a library to do and that we can’t quite understand after all beginners tutorials ... NodeJs is amazing and the tutorials don’t explain how it works inside (except for the existence of the event loop) ...
I can at least speak to NaN !== NaN. Essentially, it is _intended_ to make your code fail fast and hard, so that you know as soon as possible during execution that some calculation you did gave you a number that wasn’t a number. On top of that, all operations where an operand is NaN will result in NaN as well, and all comparisons against NaN return false, again in an attempt to protect you from utilizing that value somewhere where it could break something.
It's much easier to learn rules of omitting semicolons and make prettier format it in a way you need automagicaly (either with or without, depending on the standard you use)
You are using != undefined to check both (instead of !==) but == undefined is not the same thing (I am usually using != undefined to test it’s not undefined or not null but I don’t use == undefined)
Javascript just evaluates an object with value as true. Like an areay with one element. While empty string or array as false as it does not have any method. Thats why we check that string has value by just sending string as a argument to if statement.
I am truly against this automatic semi-colon insertion. Ok, some may consider it convenient. But it prevents many ways of formatting your code. I always like to put my braces on new lines but there are many situations where this can't be done in JS like you showed with the return statement.
Do a video explaining how javascript runs its program, closures and the event loop. That is, what actually happens behind the scenes when you run your code. Thanks
The following statements are oddly false as well: 0.1 + 0.2 == 0.3 10.495 + 4.8 == 15.295 10.495 + 34.8 == 45.295 The following statement is true, which screwed my application up today, until I found it out and rounded it off. 10.495 + 34.8 == 45.294999999999995 The numbers on the left hand side were compared to a value in MS SQL DB table, which was 45.295..
@@williamdrum9899, whether it's a javascript issue or not is more of a philosifical argument. It's an issue that exists in JavaScript, that it's inherited is not as important.
@@Reellron By that I meant that almost every programming language is like this, floating point and binary just don't work together well. You're trying to represent something that can potentially be infinitely long so you can only get a ballpark estimate. What I don't get, however, is why the computer can't understand that the answer to an addition problem can't have more significant digits than the operands and round off based on that
Colt Steele will you do ES7, ES8, ES9, ES10 LoL ... also will I get a bigger discount if I already know JavaScript but I like the way you teach and want to follow along or can you hack me a bootlegger version LoL 😂
I will in the next video, I promise! I was going to include some video of them today, but the room they are in right now is very messy and I didn't want people to see that :) They are growing so fast, it's amazing to see.
Egbo Uchenna Matthew 😮 he will not only eat the eggs 🍳? I don’t think he would be able to eat them he will be like their father (but if it’s a rooster 🐓 he will have to eat it instead of it’s eggs... eating exclusively roosters eggs is dangerous and caused many to die of starvation)
Also that return situation where it matters cannot be save d by typing semicolon. You just need to start onject on same line so whats the point in typing semicolons everywhere?
I will NOT put semicolons in my private code, it's ugly and tedious to write. As far as I know you only need to add a semicolon on a new line when it starts with a round or square bracket. ;(...) // like this.
@@nicholasmaniccia1005 Haha I'm fine with being lazy in my private code ^^ BTW how is a linter going to help me hide those ugly semicolons? I don't like them visually, they clutter up readability.
@@SuperemeRed A semicolon denotes the end of a statement, just like a period denotes the end of a sentence. Are you gong to stop typing periods at the ends of your sentences as well?
@@salembeats I know this, also as mentioned in the video, JS auto adds semicolons for you, this is a topic that has been discussed many times before in videos, articles and forums, and the conclusion is that there really is not a problem with omitting the semicolon (statement ender) as it will be auto inserted any way, the only scenario that will break is when you begin a new line with ( or [ and all you have to do is begin the line with ; in-front like this ;( and all is well. But of course, follow the code convention when you are collaborating with others. The point is that it's like, why manually add a period when the editor will automatically add it for you. And while I get you, the period and semicolon isn't a perfect 1 to 1 comparison in the way the statement or sentence is terminated due to new line and brackets and so on.
avi bank I am in love with JavaScript and his curse 🦹🏼♂️ If you prefer well behaved people then you should probably date JS little sister TypeScript she is an angel 😇
Any function well be work with a number, just make two points.
like this : 10..toFixed(x)
because the first point is not to reference, for the dozens, like 10.2 or 10.1
I know nothing about him, but i'm just being nice, had me spitting my coffe :P
😂
yeah Colt is a funny guy....
Lol.. supervisor chose JS (node) for our project because it's event driven and non I/O blocking, then proceeded to tell us to explicitly use it in a sync manner whilst using external libraries... imagine trying to use an environment and eco system based on async in a synchronized manner.. it's crazy.
Great video! However the problem with a newline after the return keyword is unaffected by the recommendation to "always use semicolons". Even if you write your semicolons, undefined will be returned. The only way to avoid it is to learn to not put return on its own line, and that has nothing to do with semicolons.
Martin Krisell Yes. That is being confused so often
Thank for your amazing and passionate work this kind of topic is truly interesting... I am wondering if you plan on doing something about back end like NodeJS one day soon
Working on some Node content for a new course right now. I'm happy to make RUclips videos on it, but it's kind of a large topic so I need suggestions about what in particular to cover!
Colt Steele please 🙏 please 🥺 don’t do like in the 75 Udemy Intro course I have purchased... if you do something NODEJS on your RUclips channel it’s *not* required to be web server stuff again (NodeJs can do way more) please teach us what we can’t get from those tutorials... explain us the real stuff: (streams, piping, buffers, sockets and +CHILD PROCESSES+) all that great stuff we all need a library to do and that we can’t quite understand after all beginners tutorials ... NodeJs is amazing and the tutorials don’t explain how it works inside (except for the existence of the event loop) ...
I can at least speak to NaN !== NaN. Essentially, it is _intended_ to make your code fail fast and hard, so that you know as soon as possible during execution that some calculation you did gave you a number that wasn’t a number. On top of that, all operations where an operand is NaN will result in NaN as well, and all comparisons against NaN return false, again in an attempt to protect you from utilizing that value somewhere where it could break something.
I thought I knew most of the weird things of JS, but this video just showed that there's more!
Javascript is all weird
I am glad you have posted a video. I have really missed you.
JavaScript designers: “hmmm, how can we break the rule of least astonishment……as much as possible? Let start by making true == false‼️”
Hi,colt can you do a vidio on css grid,would be really helpful
1.toFixed(1) is not unexcpected since js wants a floating point number. Just write 1..toFixed(1)
12:20 you said it represents infinity if it has all zeroes, but it's actually ones, and it says so right there on screen as well
3:30, I believe this is cause putting a ‘.’ by a int literal makes js think you’re trying to make a float
It's much easier to learn rules of omitting semicolons and make prettier format it in a way you need automagicaly (either with or without, depending on the standard you use)
i omit semicolon in all my codebase, for the sake of readability
Hello bro i recently brought your web development boot camp course it was awesome 👍
Thx for your effort
I think it might help others. This same method describes the areay problem in video too!
The only time I use == is to treat null and undefined as the same thing.
There are situations where null and undefined behave very differently, so learn to use === and always check for exact values.
@@omnijack in my use cases I don't need to use the value, I just need to know that it doesn't care about the value.
You are using != undefined to check both (instead of !==) but == undefined is not the same thing (I am usually using != undefined to test it’s not undefined or not null but I don’t use == undefined)
Javascript just evaluates an object with value as true. Like an areay with one element. While empty string or array as false as it does not have any method. Thats why we check that string has value by just sending string as a argument to if statement.
35..toFixed(1)
I am truly against this automatic semi-colon insertion. Ok, some may consider it convenient. But it prevents many ways of formatting your code. I always like to put my braces on new lines but there are many situations where this can't be done in JS like you showed with the return statement.
I don't agree- I always forget them. Maybe it should be optional.
That's the reason why every language ever has a coding guideline that you (in JavaScript) enforce with eslint.
Which browser theme do you use?
Ok so 123..toFixed(2) is ok ...
Do a video explaining how javascript runs its program, closures and the event loop. That is, what actually happens behind the scenes when you run your code. Thanks
Redux please ❤️
Love your work Colt...
Got a headache now :) Thanks for the fun video :)
typeof NaN
returns 'number'
I didn't even know javascript had a double equals lol. I've never used it but I have seen what the code looks like
The following statements are oddly false as well:
0.1 + 0.2 == 0.3
10.495 + 4.8 == 15.295
10.495 + 34.8 == 45.295
The following statement is true, which screwed my application up today, until I found it out and rounded it off.
10.495 + 34.8 == 45.294999999999995
The numbers on the left hand side were compared to a value in MS SQL DB table, which was 45.295..
That's not a Javascript issue, it's an inherent flaw in IEEE 754 floating point representations.
@@williamdrum9899, whether it's a javascript issue or not is more of a philosifical argument. It's an issue that exists in JavaScript, that it's inherited is not as important.
@@Reellron By that I meant that almost every programming language is like this, floating point and binary just don't work together well. You're trying to represent something that can potentially be infinitely long so you can only get a ballpark estimate. What I don't get, however, is why the computer can't understand that the answer to an addition problem can't have more significant digits than the operands and round off based on that
Great video!
thanks:) it was fun. I did not know
Shit that hurts my brain
Give me Redux or give me death!
What ide are you using here?
He's using chrome lol .
Why no one have good JavaScript ES6 course on udemy.
I just finished recording my new es2015/es6 course last night! Now I have to do all the editing, but the course is completely recorded.
@@ColtSteeleCode I will join the course on udemy.
Waiting for course, your explains is greate
Colt Steele will you do ES7, ES8, ES9, ES10 LoL ... also will I get a bigger discount if I already know JavaScript but I like the way you teach and want to follow along or can you hack me a bootlegger version LoL 😂
You didn't update us on how your chicks pets are doing?
I will in the next video, I promise! I was going to include some video of them today, but the room they are in right now is very messy and I didn't want people to see that :) They are growing so fast, it's amazing to see.
@@ColtSteeleCode Aww... That's so cute. But it's kinda funny that they are enjoying this care now to only to end up in your belly someday...😂
@@yuhceeofficial what!?
Egbo Uchenna Matthew 😮 he will not only eat the eggs 🍳? I don’t think he would be able to eat them he will be like their father (but if it’s a rooster 🐓 he will have to eat it instead of it’s eggs... eating exclusively roosters eggs is dangerous and caused many to die of starvation)
Ay.. yay, yay! This is the source of my headache. :-)
JavaScript is like the honey badger... Soo nasty! ;)
Noh. Like a skunk
hi colt.. is there anyway that we could contact you? like by email or anything else? I need some advice from a professional programmer???
javascript == weird // true
javascript == javascript // false
Javascript isn’t weird....php is weird lol I promise
awokwokwok
Promise ? Or asynk await LoL 😝
Hi.. I am a javaneese..
FYI, this complexity is just way too little compared to the real java language (a.k.a boso Jowo)..
Lol
Great video, but I disagree on the semicolons bit. I prefer to just not use semicolons and write functions like this `const myFunc = () => { ... }`
Is that a joke?
i-triple-e? :)
W8 what??? That semicolons section: "and thats why you should ...". No! If you know what you doing you should ommit these stupid semicolons.
Also that return situation where it matters cannot be save d by typing semicolon. You just need to start onject on same line so whats the point in typing semicolons everywhere?
Javascript is a mess
It's a beautiful mess
Solution: don't use JavaScript
yeah, use C for developing the website front-end
@@isaque1764 exactly ❤
I will NOT put semicolons in my private code, it's ugly and tedious to write. As far as I know you only need to add a semicolon on a new line when it starts with a round or square bracket.
;(...) // like this.
Not ugly use a linter, and if that's tedious idk man that says more about you
@@nicholasmaniccia1005 Haha I'm fine with being lazy in my private code ^^
BTW how is a linter going to help me hide those ugly semicolons? I don't like them visually, they clutter up readability.
@@SuperemeRed A semicolon denotes the end of a statement, just like a period denotes the end of a sentence.
Are you gong to stop typing periods at the ends of your sentences as well?
@@salembeats I know this, also as mentioned in the video, JS auto adds semicolons for you, this is a topic that has been discussed many times before in videos, articles and forums, and the conclusion is that there really is not a problem with omitting the semicolon (statement ender) as it will be auto inserted any way, the only scenario that will break is when you begin a new line with ( or [ and all you have to do is begin the line with ; in-front like this ;( and all is well. But of course, follow the code convention when you are collaborating with others. The point is that it's like, why manually add a period when the editor will automatically add it for you. And while I get you, the period and semicolon isn't a perfect 1 to 1 comparison in the way the statement or sentence is terminated due to new line and brackets and so on.
@@nicholasmaniccia1005 Here is a great video explaining the reasoning for omitting semicolons: ruclips.net/video/Qlr-FGbhKaI/видео.html
Javascript is a vulgar language.
avi bank I am in love with JavaScript and his curse 🦹🏼♂️ If you prefer well behaved people then you should probably date JS little sister TypeScript she is an angel 😇
I have never had to use ===.
Zahra Q my friend which was working on construction 🏗 sites never needed a harness and now he’s dead 💀 LoL 😂
Everything is weird in JavaScript, in my opinion it's one of the worst languages out there.
Ever used PHP?
@@CathrineMacNiel PHP is easier than JavaScript imo.