Read these guidelines before submitting projects: Project Submission Guidelines
function in2cm(inches) { var cm = inches * 2.54; return cm; }
function in2cm(inches) { var cm = inches * 2.54; return cm; }
<button id="btn1" onclick="eventHandler( );">Instead, to add an event handler to a control, use
var button1 = document.getElementById("btn1"); button1.addEventHandler("click", eventHandler);or
var button1 = document.getElementById("btn1"); button1.onclick = eventHandler;
window.addEventListener("load", init);