Javascript utility functions are time savers. Keep them in your "toolbox" or "utility belt" to take to any project you work on. These functions are abstract and can be plugged into any project. I've provided a source code link in the description above which will allow you to create a utility module from the functions featured in this tutorial. Just getting started with Javascript? Check out my full 8 hour course video here: kzbin.info/www/bejne/e5eknWyYrN-JkM0 🚀
@kostiantynkarzhanov9216 Жыл бұрын
Awesome! Dave, thank you so much for sharing your knowledge with us 💛
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@mikanika21 Жыл бұрын
Great, Thank You for all Your work, Greetings from France
@DaveGrayTeachesCode Жыл бұрын
You're welcome! And hello 👋 to France!
@ishan1013 жыл бұрын
Thank you for sharing this valuable tips indeed.
@DaveGrayTeachesCode3 жыл бұрын
Glad it was helpful! 💯
@AH-cf9cv3 жыл бұрын
Thanks very much for ur hard work from India.
@DaveGrayTeachesCode3 жыл бұрын
You're welcome! 🙏
@amerabdelrahman48723 жыл бұрын
Thanks for sharing
@DaveGrayTeachesCode3 жыл бұрын
You're welcome!
@sonnybrown52282 жыл бұрын
this is awesome
@DaveGrayTeachesCode2 жыл бұрын
Thank you!
@iketutsistawan42483 жыл бұрын
what is the function/purpose of capture parameter in the addEventListener utils class?
@DaveGrayTeachesCode3 жыл бұрын
Good question! It has to do with event bubbling and capturing. You can learn more about it in my Javascript Event Listeners tutorial here: kzbin.info/www/bejne/i4e1daRjrNOZnc0 💯
@marcod.6433 жыл бұрын
Did you wear a t-shirt from Kevin Powel? Are you going to have some type of collaboration? It would be awesome! Two of my preferred KZbin content creator, with the best clear, useful, inpiring contents.
@DaveGrayTeachesCode3 жыл бұрын
Thanks! Yes, I did wear his shirt. Kevin is great and his channel is one of my favorites. I'd love to collab with him sometime! 🚀💯
@abdiag60317 күн бұрын
What if in your sanitizeInput() you don’t want to return the value with a div around it, instead of creating the div element is it proper to create a document fragment instead???
@blaircfleming3 күн бұрын
the sanitizeInput() function doesn't return the div, only the sanitized text
@abdiag6033 күн бұрын
@@blaircfleming recheck well, it does add a dic around as text content
@blaircfleming3 күн бұрын
@@abdiag603 the div is temporarily created in the function, but the value that is returned is the sanitized content of that div, not the div itself
@rangabharath42533 жыл бұрын
Awesome
@DaveGrayTeachesCode3 жыл бұрын
Thanks! 🚀
@Knards3 жыл бұрын
Is there some trick to this import? I wrote out the functions in a file called utils, but when I import them way you did, and through reading in MDN Web Docs, all I get in the console is "Require is not defined". The 2 files are in the same directory. My last iteration is import { properCase } from './utils.js';
@DaveGrayTeachesCode3 жыл бұрын
No trick. Did you check the link to the source code in the description? Compared to the video, I added the "export" keyword before const for each function in the gist source code. Other than that, double-check import syntax on MDN here: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import You might also make sure you have type="module" in your script element in the HTML file.
@Knards3 жыл бұрын
@@DaveGrayTeachesCode Not sure what I did, but I fixed it. Thanks for introducing me to import/export amd the functions!
@DaveGrayTeachesCode3 жыл бұрын
@@Knards That's great! I also have a separate tutorial on modules 💯🚀
@Knards3 жыл бұрын
@@DaveGrayTeachesCode Now that I will be checking out!
@andrewclarke69163 жыл бұрын
@@DaveGrayTeachesCode I had a problem with importing the utility functions into my main javascript file at first. Got the error 'Uncaught SyntaxError: Cannot use import statement outside a module'. Fortunately, a quick bit of googling revealed that I needed to add the type="module" attribute to my script tag in the HTML file.
@philip96773 жыл бұрын
how do you get both paramOne and paramTwo,
@DaveGrayTeachesCode3 жыл бұрын
The getParameterValue() function is designed to return the value of the parameter name you specify as the first argument passed to the function. You need to call the function for each parameter value you want returned. 😀
@philip96773 жыл бұрын
@@DaveGrayTeachesCode thanks dave very helpful
@DaveGrayTeachesCode3 жыл бұрын
@@philip9677 You're welcome!
@acethomas57742 жыл бұрын
Who in these comments can plz help me with JavaScript functions for this online game that i play it has several things that you can do on the game and each thing has a script that can be written for them and book marked