I wanted to document.write the number someone writes on the prompt box with two decimals. But console says "document.write can be a form of eval" and it doesn't appear on the html page, even though I get the prompt for the number.
function roundNumber () {
let myNumber = prompt('Please insert a decimal number.');
return myNumber.toFixed(2);
}
document.write(roundNumber());
Hope someone can help and thanks in advance.