added comment to return line in else block
added reusable and repeatable code below function

also re-added return puppySmiles and deleted unneccessary variables
added workspace file to idea folder
added comments to return values and deleted console.log from function

Made another ternary statement for the console.log information
Switched total variable from top of function to below it

and deleted unnecessary variables in the function
added workspace file to idea folder