touch position

hi, i am quite novice at coding ios/android, anyway, i was hoping someone could tell me how to record the touch position to a variable, hopefully in Vector2 format and in javascript

you can use Input.touches class for it

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

using System;

List touchPositions = new List();
void Update() {
	if(Input.touchCount > 0) {
		touchPositions.Add( Input.touches[0].position)
	}
}

you can convert Generic List to Array by using ToArray() Method of you List Variable

i don’t understand it completely so could you show me how to do something like this`

var pos1X = 0.0;
var pos1Y = 0.0;
var pos2X = 0.0;
var pos2Y = 0.0;

function Update () {
//pos1X = the x value of the first touch if its x value is (> screen.width * 0.5)

//pos1Y = the y value of the first touch

//pos2X = the x value of the second touch

//pos2Y = the y value of the second touch
}

`