<input type="text" id="input" maxlength="10" size="7">
<button id="input" onclick="myfunction();">Click me</button>
<script type="text/javascript" src="app.js">
var input = "input";
document.getElementById("input").value = input;
function assign(arr, vars) {
var x = {};
var num = math.min(arr.length, vars.length);
for (var i = 0; i < num; ++i) {
x[vars[i]] = arr[i];
}
return x;
}
var arr =[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var x = assign(arr, ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',]);
var z = (9 + 21 + 8 + (var a*3) + var b + (var c*3) + var d + (var e*3) + var f + (var g*3) + var h + (var i*3) + var j);
var w = (var z % 10);
var v = ("978" + var a, var b, var c, var d, var e, var f, var g, var h, var i, var w);
document.getElementById('v').innerHTML = var v;
</script>
<div id="output"> </div>
</div>