Check out example codes for "ff". It will help you in understanding the concepts better.

Code Example 1

<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<link href="../style.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <header>
      <a href="../index.html" class="myButton">go back to homepage</a>
    <h1> money converter </h1>
   <h3> <em> convert your money for the low low price of 59.99 </em> </h3>
    </header>
    <main>

<h1>valuta converter</h1>
<p>
 <input type="number" id="bedrag"/> 
 <select id="valuta" size="1">
..<option value="GBP">brittish pound</option>
..<option value="USD" selected>US dollar</option>
 </select>
</p>
<a class="myButton" id="zetOm">change to &euro;</a>
<div id="converterContent"></div>
    </main>
    <footer>
    </footer>
	<script src="../js/converter.js"></script>
</body>

</html>


document.getElementById("zetOm").addEventListener("click", zetom);
function zetom () {
const koersUSDtoEUR = 0,92 Euro;
const  koersGBPtoEUR = 1,12 Euro;
const bedrag = document.getElementById("bedrag").value;
const valuta = document.getElementById("valuta").value;
let bedragEuro;
if (valuta=== "USD") {
let bedragEuro = bedrag * koersGBPtoEUR;
}
else {
  let bedragEuro = bedrag * koersGBPtoEUR;
}

let nieuwElement = document.createElement("p");
 nieuwElement.innerHTML =  bedrag + valuta + "Is" + bedragEuro + "&euro;!";
document.getElementById("converterContent").appendchild(nieuwElement);
}

Learn ReactJs, React Native from akashmittal.com