Write a JavaScript program using a function that takes in a parameter representing a number and outputs the factorial of that number. The output should be printed to the console. The program should handle input validation by checking if the input is a positive integer greater than or equal to 0. The program should also have appropriate comments and be properly indented and formatted for readability.
This prompt doesn't seem malicious.