- [Narrator] The function we have right now is usable,…but it's not very useful.…It's completely reliant on us…defining these two variables a and b,…because they're being used inside the function itself,…and this is not good practice.…What I want to be able to do is pass…whatever values I want into the function…and then have it run on those values,…so I can reuse the function again and again.…I do that using Arguments.…To set up Arguments, we simply list out the arguments…we want in the function definition…up here inside the parentheses.…So in this case, I want the arguments a and b.…

Now a here will become a inside the code block,…and b will become b inside the code block.…But don't get these two arguments, a and b,…confused with these variables down here.…Let me show you what I mean.…If I change these variable names…to firstFraction and secondFraction,…I can then pass the values of each of these variables…into my function using them as arguments.…So the first argument,…which we'll map to a, is firstFraction.…

The second argument,…

Resume Transcript Auto-Scroll

Author

Released

5/15/2017

JavaScript is a scripting language of the web. As the web evolves from a static to a dynamic environment, technology focus is shifting from static markup and styling—frequently handled by content management systems or automated scripts—to dynamic interfaces and advanced interaction. Once seen as optional, JavaScript is now becoming an integral part of the web, infusing every layer with its script.

Through practical examples and mini-projects, this course helps you build your understanding of JavaScript piece by piece, from core principles like variables, data types, conditionals, and functions through advanced topics including loops, closures, and DOM scripting. Along the way, you will also be introduced to some ES6 and the basics of JavaScript libraries.