`;
}
function copyResult() {
if (!lastResult) return;
navigator.clipboard.writeText(lastResult.sentence).catch(() => {});
}
function saveToHistory() {
if (!lastResult) return;
history.unshift({ text: lastResult.hist, time: new Date().toLocaleTimeString('en-IN', { hour: '2-digit', minute: '2-digit' }) });
if (history.length > 8) history.pop();
renderHistory();
}
function renderHistory() {
if (!history.length) { document.getElementById('historyCard').style.display = 'none'; return; }
document.getElementById('historyCard').style.display = 'block';
document.getElementById('historyList').innerHTML = history.map(h =>
`
${h.text}${h.time}
`
).join('');
}
function clearHistory() {
history = [];
renderHistory();
}
function resetFields() {
document.getElementById('amount').value = '';
document.getElementById('rate').value = '';
document.getElementById('tenure').value = '';
showEmpty('Enter your loan amount, interest rate and tenure to see the EMI breakdown.');
}
Email Verification
Close Your Account
Are you sure? Be aware this action can not undo.
Best percentage calculator with 8 modes, visual bars, formula display and history