- We create an
ifElsefunction which has a condition of true or false passed into it, 2 functions and 1 argument to be used in those functions.
- Notice that
funcTwoboth take an argument of
xwhich is console logged when they are called.
- We call the
ifElsefunction and pass in
trueas the condition, the two functions and a string of
- The condition is true so
isTrueis called and the
myArgstring gets console logged as it was passed in via the