I love learning from you so much. The biggest bummer to learning things about programming is people tend to over complicate things when they don't need to. I guess to sound super smart??? Every time I watch a video from you nothing is over complicated. It's stated just how it is. THANK YOU! Also thank you for teaching me about promises.
@CameronChardukian5 жыл бұрын
I agree with you 100% Grant.
@victorgasparoni5 жыл бұрын
The bad thing about most developers is that they are the ultimate flexers.
@_unknown7_2 жыл бұрын
@@victorgasparoni 😐
@zee15983 жыл бұрын
Can I just say, I love your energy, you're making this learning process really fun.
@epictetus-nicopolis3 жыл бұрын
I just come back and re-watch these videos, just to feel your positive energy. Thank you 😍
@MicheleMasina6 жыл бұрын
Hey Dan, just another quick tip to make your code slightly shorter. When you write .catch(err => console.error(err)) you can just write .catch(console.error) instead. This is the case every time you would call an arrow function with just one parameter, only to call another function on that parameter.
@saurabh75prakash5 жыл бұрын
@Sph2329 do we need bind() here, I think the arrow syntax (even though not explicitly present) will take care of the context, so we need not fix "this" using bind IMHO.
@rampage95304 жыл бұрын
Simply... you are an excellent teacher !
@predicate6 жыл бұрын
can someone please make a 10 hour version of 5:45?
@TheCodingTrain6 жыл бұрын
I fully endorse this project idea.
@bbit-solutions70046 жыл бұрын
gph.is/2P7lNDP
@beccaarauz6 жыл бұрын
HAHAHAHAHA OMG NO, I almost had an anxiety attack with this
@CameronChardukian5 жыл бұрын
Haha that was a struggle
@ark3334 жыл бұрын
@@bbit-solutions7004 this doesn't work
@martinsonuoha6 жыл бұрын
Your tutorials are awesome!
@erfanrj27802 жыл бұрын
I love your channel ! it's about 2 days that I found it. since I watched your first video about js, I search topics that I'm looking for, first.
@TheBarthinator6 жыл бұрын
oh my this is way easier than i thought
@FaithFedora Жыл бұрын
I have never been so excited to learn programming 😊😊😊
@dongyoungkim9622 жыл бұрын
amazing explanation that takes time to actually how each component works in depth.
@Gottii926 жыл бұрын
who's watching this in the year 3122? 11:11
@jurjenvanderhoek3165 жыл бұрын
Maybe you will be in one of your future incarnations
@ouza14306 жыл бұрын
you are a gifted professor
@11am5 жыл бұрын
i just love the way you teach, it is just so engaging! thank you so much!
@robocop303016 жыл бұрын
Very informative, and also entertaining. Thank you!!
@t1002100220024 жыл бұрын
You really are a great teacher.
@navdeepbhanderi2 жыл бұрын
Great teacher on the earth 🌎.
@nnrmnlg6 жыл бұрын
Could you do some more native javascript? I feel like it would be interesting
@amanhaman85686 жыл бұрын
despite knowing most of the stuff, it:s entertaining to watch. nice!
@Cloud-5774 жыл бұрын
My fav channel!!
@JBahrsShiz5 жыл бұрын
Noob question: at 3:41 you have delay() called on line 3, but defined on line 7. How does this work? I thought you had to define before calling. I could be mixed up too as I have limited experience. Got the code bug and trying to learn.
@IbnuCuruk5 жыл бұрын
Jason Bahr Functions that are written like that are hoisted; it means that the program can run it, even though they are written somewhere else of where they are called. Every function notations have their pros and cons. Please correct me if I’m wrong. I’m still a noob too.
@martutittu4 жыл бұрын
When you walk between frames it reminds me so freakin' much of logi mouse moving between screens :). Great tut, thank you !
@어깡갱6 жыл бұрын
Daniel you're Genius!!
@nomangulkhan6 жыл бұрын
*You're Just amazing!!!!!!*
@idontevenknow37076 жыл бұрын
Hi DAN! not supposed to be here, still on the p5js tutorials, I SHALL CATCH UP THOUGH! Peace & Love on the CodingTrain! CHOoOOOoOoooOOOoOCHooOOOoOOO
@jxs48910 ай бұрын
Great video! Thank you so much
@tbntdima6 жыл бұрын
I was reading eloquent js for 4 days, and couldn't get this topic. Thanks for video!
@GeeVaaz6 жыл бұрын
10:35 - YMCA
@Caraxian6 жыл бұрын
I know all this but you make it so interesting to watch so I like to watch anyway :D
@Caraxian6 жыл бұрын
Can’t wait for async/await since I’m not quite familiar with them
@JBahrsShiz5 жыл бұрын
Thank you!
@shifter654 жыл бұрын
Really like your ES6 explanations. Any plans to do more?
@TheSaintsVEVO4 жыл бұрын
2:00 aww 😂
@clevermissfox Жыл бұрын
How are the functions noCanvas() and createP() working ? Where are they defined ?
@TheCodingTrain Жыл бұрын
These are part of the p5.js library! p5js.org/
@clevermissfox Жыл бұрын
@@TheCodingTrain only first heard of p5 on your channel. Will check into it!
@user-zp1dv4yh5e4 жыл бұрын
Did you created the pj5 library?
@marlon40086 жыл бұрын
where does that resolve and the reject come from? is it a promise method?
@attilatoth2685 жыл бұрын
No. It's just a callback passed to the Promise constructor. The name resolve and reject is just a convention, but you can name it anything, it doesn't really matter.
@etymology_6 жыл бұрын
I may have missed this..but what is the createP..his HTML id? or is that a js method that appends the return data?
@TheCodingTrain6 жыл бұрын
It's part of the p5.js library, see: p5js.org.
@davidyankee19866 жыл бұрын
Thanks Daniel... very Useful do you have any video or plan of video where we get data from firebase using a searchbox?
@maheenkhurram6 жыл бұрын
Thank you very much really nice video. made simple and jokes are timely and interesting.
@RSTao774325 жыл бұрын
Hi, you have a SetUp Function() then you have a NoCanvas Function.. Jusst curious! Does Javascript automatically create a canvas in the DOM? & if so/ or not... is NoCanvas a native JS function itself? or have you defined that elsewhere? Promises looking handy.
@juschu856 жыл бұрын
8:40 Yes, it works. But why. You didn't put an else block around setTimeout and you don't return after you call reject. So even if the isNaN function returns true it should still execute setTimeout. Does that mean the function which is passed to the Promise constructor automatically returns after the function passed in the second argument is called? If yes, I don't like that. That should be in the control of the developer.
@kebman6 жыл бұрын
No. Pretty sure you have to manually return it, as it's also a matter of security.
@juschu856 жыл бұрын
kebman I didn't watched it all over again, but I think later (in another video(?)) he also noticed that he made a mistake at this point.
@nomtijorti5 жыл бұрын
no it won't. by default what comes after and if it considered else.
@attilatoth2685 жыл бұрын
It works because promises don't change after they settled (either fulfilled or rejected). So you cannot have a promise that will reject after 1 second, but then resolve after 2 second. In this implementation the setTimeout still happens, the resolve function will be called (after the delay), but it won't change the rejected promise into a fulfilled one.
@kebman6 жыл бұрын
*fetch()* still isn't built into Node.js, so in the mean time you need to do *npm install node-fetch --save*
@andromilk2634 Жыл бұрын
What I don't get is that when setTimeOut calls resolve, what does resolve do exactly? Is it a function which does nothing? Thanks
@jpc5016 жыл бұрын
Superb
@IsfhanAhmed6 жыл бұрын
can you make video on javascript and ecmascript without p5.js
@anmaraziz83603 жыл бұрын
your just amazing please keep doing things just the way u r funny & simple
@jorgelightwave5 жыл бұрын
I'm learning a lot with your videos! PS: ES stands for EcmaScript
@amirulidzham36865 жыл бұрын
Hello, why I need to use resolve() in my code. If not, then will never execute. I'm not sure it is related to angular. I have new Promise(resolve,reject). I expected that it will continue to execute and auto return resolve and if any error will return rejected
@grownmancrying5 жыл бұрын
My coworker told me you look like Hugh Jackman. Anyway thanks for the video man, love from PH.
@notarealhandle1235 жыл бұрын
Promises are made to be broken. Does it work here as well?
@Caraxian6 жыл бұрын
You should really cancel execution of the function after rejecting otherwise the program will be running the setTimeout to resolve a rejected promise which is a waste of system resources :)
@Caraxian6 жыл бұрын
Oh it’s fixed I’m the next video, which is unlisted :)
@TheCodingTrain6 жыл бұрын
yeah, i goofed!
@tempest_dawn6 жыл бұрын
Good to hear it's fixed in the next one, but yeah it's really good to get in the habit of always returning if you reject or resolve a promise as I believe calling any of those functions more than once can result in undefined behavior?
@Caraxian6 жыл бұрын
Cole Erickson depends on what it’s doing, but yea. The promise itself will be fine since it can only resolve or reject once but doing the action anyway could cause some problems elsewhere in some cases
@siluverukirankumar99546 жыл бұрын
Is delay, resolve and reject are JavaScript built in keywords?
@RakeshBitling4 жыл бұрын
You Videos are excellent please make javascript AWS developer S3 videos 👍👍👍👍
@ericvaldez1746 жыл бұрын
Do you still write program people of year 3122?
@santiagojaramillorodriguez82723 жыл бұрын
how can I see my code in the browser? :(
@Vibestr2 жыл бұрын
anyone notice that the output from the resolve never got delayed? I applied this code inside a console and it delayed it by the time indicated, but the createP method displayed the message right away. edit: i figured out my issue. The setTmeout() has to have a callback argument as follows and then the delay works: if (isNaN(time)) reject(new Error(time + " is not a valid number")); else setTimeout(() => resolve("test resolved"), time);
@martinbozinovski5 жыл бұрын
I am the only one that is trying codes? @7:15 the code doesnt work, at least not for me. Where am i taking a mistake? Here is the code, maybe can someone tell me with just a look at it: function setup() { delay(1000) .then(() => createP('Hello')) .catch((err) => console.error(err)); } function delay(time) { return new Promise((resolve, reject) => { setTimeout(resolve, time); }); }
@akinbolaoluwaferanmi8985 жыл бұрын
think its because he uses p5.js which you might not be using
@alizahid47426 жыл бұрын
where the react tutorials at. thank you
@TutocarloCV6 жыл бұрын
nice
@akinbolaoluwaferanmi8985 жыл бұрын
Hello, guys am a little bit confused tried running similar code in vanilla javascript while it works, the timing is completely off. the function runs immediately in the browser. delay(9000) .then(document.write('Promise is sucessful')) .catch(err => console.error(err)) function delay(time){ return new Promise((resolve,reject)=>{ setTimeout(resolve,time); }); }
@shonendumm2 жыл бұрын
Hi I encountered a similar issue, my resolve was returned immediately without delay. Then I read that it's because I wrote it as setTimeout(resolve(), time) . Note the parentheses. It should be setTimeout(resolve, time) . But I see that yours is written without parentheses, so it should run with delay though. That's strange.
@romanemul16 жыл бұрын
looks like we are heading times where java will be updating each few hours.
@Ineffable_Wisdom6 жыл бұрын
Can anybody tell me what the noCanvas() function is for?
@jayakrishnalakkoju4534 жыл бұрын
Let CodingTrain = () => setTimeout(()=>♥️, 1000); CodingTrain();
@shineten49616 жыл бұрын
what is p5?
@TheCodingTrain6 жыл бұрын
p5 is a library for JavaScript, for more: p5js.org.
@Nampjg4 жыл бұрын
using the Promise(resolve,reject) was almost felt to me like cheating in examination or plagiarism :(
@jamoliddinz3 жыл бұрын
it's still relative)
@mkifd4 жыл бұрын
Just came back from the year 3122 just to keep my promise 🤧
@chizll3 жыл бұрын
Hi to all those watching in the year 3122! Sincerely, 2021
@2e3crescens6 жыл бұрын
@ayush.kumar.139076 жыл бұрын
The Anchor looks like Gilfoyle from Silicon Valley, LOL
@kebman6 жыл бұрын
What was I talking-saying?
@ramnathtejachekka70903 жыл бұрын
who is watching this at 3422! ... all the people during lockdown be like "well it felt like millennium, so me!" :D
@Pareshbpatel3 жыл бұрын
{2021-12-16}
@nomangulkhan6 жыл бұрын
How do you know that you have made any type of coding mistake? plz answer i am waiting!
@anibal98126 жыл бұрын
You test your program to see if it behaves the way you expect it to or if any error messages pop up. There’s a paradigm called Test-Driven Development (or TDD) that helps to automate this kind of thing, but I wouldn’t recomento to a complete beginner to programming, as it requires using libraries and writing even more code. If you’re comfortable with these things, however, check it out, it’s an awesome way to program. In JavaScript specifically, you check how the page answers to your inputs, and if there’s any red messages in the console.
@nomangulkhan6 жыл бұрын
Thanks
@TheBarthinator6 жыл бұрын
You could lookup a linter plug-in for atom
@nomangulkhan6 жыл бұрын
Thanks BROTHER!
@ghazni1013 жыл бұрын
came for self help...going with self doubt
@codegate6154 жыл бұрын
This is over-complicated. Use easier examples to teach brand new and difficult material.