At first glance the code for the function looks right so why aren’t we seeing anything in the console?
We can see we have a function called ‘ringDoorbell.’ Now picture that you have a doorbell in your house installed yes; but can you hear the doorbell sound if no one presses it? Of course not! In this example, we are simulating that same scenario.
Some functions we create do not get executed and thus we are not able to see anything displayed on the console. This is because they are not active until we invoke the ‘call’ command. Therefore, we need to invoke the function by ‘calling’ the function name and adding the parenthesis in the end; like this:
See image below
Thank you for reading