A) Firstly, for the parameter “target” used in the functions CompGuess and HumanGuess, how are we calling that value to subtract from compNum and humanNum if “target” hasn’t been defined? I know that question sounds confusing but in essence, I don’t understand how we get “target” from the generateTarget function.
B) My second question is pretty similar to the first. How does the script go from finding whether HumanGuess <= CompGuess is true or not to using that to decide if winner===‘human’ or inner===‘computer’?
I’m sure these are pretty simple concepts, but I basically just do not understand how some of the values get transferred without necessarily being written explicitly. Sometimes, things just seem to transfer over without any reason behind them - it just looks too convenient sometimes. Thank you to anyone who sees and responds to this, I really appreciate it!