So I can not make the input into a integer. I want to turn this into a int so then it can calculate the age of you. I have been researching but can not find the right answer. HTML CODE:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>learn</title>
<script src="script.js"></script>
</head>
<form action="/learn.html">
<b>Year Born:</b> <input id="input988744" type="value">
</form>
<button onClick="calculateAge(birthYear);">Summit</button>
<body>
</body>
</html>
Javascript Code:
/*
Function
*/
// var
var birthYear;
birthYear = document.getElementById("input988744");
// function
function calculateAge(birthYearInFun) {
"use strict";
console.log(2018 - birthYearInFun); // make it a number
}