Trouble reading into an array of objects


Ok, so I have this simple form here:

<form (ngSubmit)="logForm()">
        <ion-input type="text" [(ngModel)]="name" name="Name"></ion-input>
        <ion-textarea [(ngModel)]="species" name="species"></ion-textarea>
        <ion-textarea [(ngModel)]="age" name="age"></ion-textarea>
        <ion-textarea [(ngModel)]="sex" name="sex"></ion-textarea>
        <ion-textarea [(ngModel)]="rego" name="rego"></ion-textarea>
        <ion-textarea [(ngModel)]="ph" name="ph"></ion-textarea>
      <button ion-button type="submit" block>Add Pet</button>

I can read the values fine. However, the problem is I’m having trouble setting two of the values to numbers for a provider.

//name:string, species:string, age:number,
// sex:string, rego:number, phone:string

logForm( petService: PetService) {

		this.a = [,this.species];
		this.b = [this.age];
		this.c = [];
		this.d = [this.rego];
		this.e = [];
		this.peta = this.a.concat(this.b,this.c,this.d,this.e);
		console.log("Peta = ");
		if (typeof this.peta[2] === 'number'){
			alert("There's numbers!");
		console.log("Peta = ");

^^; I swear I’m blind.


I found the problem so I’ll post it here in case folk get the same thing.

this.b = [parseInt(this.age)];

Parseint returns a value, it doesn’t make the variable an int.