Looking for help with a function that can determine if a string contains a period and add one if it doesn't. So far, I'm struggling to make it either continuously add periods or not add any at all.
function checkPeriod() {
if (inputString.indexOf(".") < 0) {
inputString = inputString + ".";
document.getElementById("output").innerHTML = inputString;
}}