HubSpot Interview Question

Create a logger function that logs only if the app is not in Production

Interview Answer

Anonymous

Oct 6, 2022

Simple function where you use a variable called "prod" outside of your function definition. Inside of the function just call console.log only if "prod" is equal to false.