Input field changes int of variable | UnityScript (590551)

Hey programmers.

I bought a book a few days ago with that I wanna learn how to use UnityScript/JavaScript.
The book is kinda old so it is not featuring the new ui/canvas system of unity. I wanna make something
really easy but I am kinda stuck since im very new to UnityScript.

So this is how my code looks right now:

#pragma strict

var input1 : int;
var input2 : int;
var output1 : int;

function Update () {

    output1 = input1 + input2;

}

I want both of the input variables to belong to an input field so if the user types in to them the int of the variables change.
In the end a third field should show the result. How can I handle this?
greets

These links should hopefully get you started

http://docs.unity3d.com/Manual/script-Text.html

I am now able to display the numbers that are being filled in the input fields in a seperate text.
but i cant bring the text (the numbers) as integers into the script to add them together…
i tried to add the input field values together but that doesnt work aswell.

You need to convert the inputfields text value, which is a string, to a number. Take a look at this link