Functions allow us to execute blocks of code, simply by typing the function name as a line of code in our program… but we also need to add parenthesis at the end (and don’t forget the semicolon)! E.g. my_function(), and that’s it!
But JavaScript even allows us to create functions that don’t have names, so how can we possibly call those? Such functions are called anonymous functions, but there’s nothing like a good example!
00:00 - JavaScript functions intro
04:27 - Alternating paragraph colours
10:39 - Playing with timers in JS
13:22 - Passing variables to functions
18:38 - Anonymous functions in JS
Tutorial 1 - • JavaScript DOM: It mad... (what is the DOM?)
Tutorial 2 - • JavaScript Variables: ... (declaring variables)
Tutorial 3 - • JavaScript IF-ELSE & L... (conditional logic)
Tutorial 5 - • JavaScript Maths: Prog... (maths)
Негізгі бет JavaScript Functions: Grasp the BASICS - Before It Gets WEIRD
Пікірлер