Chapter projects
Create a recursive function
Create a recursive function that counts up to 10. Invoke the function with different start numbers as the arguments that are passed into the function. The function should run until the value is greater than 10.
Set timeout order
Use the arrow format to create functions that output the values one
and two
to the console. Create a third function that outputs the value three
to the console, and then invokes the first two functions.
Create a fourth function that outputs the word four
to the console and also use setTimeout()
to invoke the first function immediately and then the third function.
What does your output look like in the console? Try to get the console to output:
Four
Three
One
Two
One