Learn how to generate random whole numbers between two variables in JavaScript using Math.random(). Complete guide with examples, reusable functions, and best practices.