Skip to content

Commit

Permalink
g
Browse files Browse the repository at this point in the history
  • Loading branch information
tonela10 committed May 14, 2024
1 parent 73d71ac commit 1f4921e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions implementation/romans.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ function init() {
var outputArea = document.querySelector('.convert-output');
var inputArea = document.querySelector('input[type="text"]');

const getModeTitle = (integerToRoman) => {
return integerToRoman ? 'Integer To Roman' : 'Roman To Integer';
};

modeCheckbox.addEventListener('change', (e) => {
header.innerHTML = getModeTitle(e.target.checked);
});

const getModeTitle = (integerToRoman) => {
return integerToRoman ? 'Integer To Roman' : 'Roman To Integer';
};

// Now, the convertion operation does only perform the operation.
// Things we have extracted to this listener:
// 1 - Read the UI inputs (inputArea.value)
Expand Down

0 comments on commit 1f4921e

Please sign in to comment.