You explain things thoroughly, and I can understand from a novice perspective! Your work is underrated and I hope more people find your videos to learn from!
Why does = work in the ternary operator? I thought === was for booleans and = was an assignment and == was for evaluation? I've been struggling with how/why boolean logic works/doesn't work in some instances and why it seems to have inconsistent expression throughout JS, depending on when/how/why it's used.
It may be a bit difficult to organize that way because they are so varied, but I do have plans to put together some additional playlists that may help. Beginning playlist and so on. Also, I have a tutorial page on my website that organizes them by different categories: allthingsjavascript.com/youtube.html
@@AllThingsJavaScript Ya, that's what I suspected, but I wasn't too sure. Thanks for clearing that up. This JavaScript stuff has me pulling my hair out.
For the last one, couldn't just just have had obj.pass = obj.score >=min Also, can you do a video about the comma operator? I saw this code to return the middle section of a string function getMiddle(s) { return s.substr(Math.ceil(s.length / 2 - 1), s.length % 2 === 0 ? 2 : 1); } However, I have no clue what the comma is doing. (I also have no clue what returning the 2 or 1 at the end do as well tbh...)
Yes, you are correct. That would work great and would be simpler. I got too caught up in showing the ternary operator. :-) And yes I will plan on a tutorial for the comma operator.
You explain things thoroughly, and I can understand from a novice perspective! Your work is underrated and I hope more people find your videos to learn from!
Thank you, well explained!
great class!
Thank you for this explanation!
Why does = work in the ternary operator? I thought === was for booleans and = was an assignment and == was for evaluation? I've been struggling with how/why boolean logic works/doesn't work in some instances and why it seems to have inconsistent expression throughout JS, depending on when/how/why it's used.
So the = used with these examples is an assignment operator. We are assigning a boolean to obj.pass. We just do it in a couple of different ways.
Can you organize the videos from basic to advanced? Thank you and you rock!
It may be a bit difficult to organize that way because they are so varied, but I do have plans to put together some additional playlists that may help. Beginning playlist and so on. Also, I have a tutorial page on my website that organizes them by different categories: allthingsjavascript.com/youtube.html
All Things JavaScript, LLC thank you. Keep up ur work.
ruclips.net/channel/UCRQhZGXC0WK85YRXl7nGX0wplaylists
Here you go
Where did you define "min" in your code? I don't understand how "min" is being calculated.
The value for min is passed into the function when the function is called. (passOrFail(student1, 80);)
@@AllThingsJavaScript Ya, that's what I suspected, but I wasn't too sure. Thanks for clearing that up. This JavaScript stuff has me pulling my hair out.
@@scottonanski4173 Stick with it! It will start clicking.
Think the Ternary is easier to understand than a normal if statement.
awesome, thank you.
Thank you.
For the last one, couldn't just just have had
obj.pass = obj.score >=min
Also, can you do a video about the comma operator?
I saw this code to return the middle section of a string
function getMiddle(s)
{
return s.substr(Math.ceil(s.length / 2 - 1), s.length % 2 === 0 ? 2 : 1);
}
However, I have no clue what the comma is doing. (I also have no clue what returning the 2 or 1 at the end do as well tbh...)
Yes, you are correct. That would work great and would be simpler. I got too caught up in showing the ternary operator. :-)
And yes I will plan on a tutorial for the comma operator.
Here is a tutorial on the comma operator: ruclips.net/video/IvqdQB549KQ/видео.html
Yeah! :D
I actually saw it already, but I've been moving and planning like the last 3 weeks. Forgot to comment.
Thanks much though!
let passOrFail=(obj,min)=>{obj.result=(obj.marks>=min)?"pass":"fail";}
Thanks for sharing!