What is the method for transforming decimal numbers to hexadecimal in JavaScript?

In JavaScript, what steps should I follow to change decimal numbers into their equivalent hexadecimal format? I would appreciate a detailed explanation or examples to help illustrate this process.