Reverse an array using Stacks

// Reverse an array using Stacks.

// Input: [13, 11, 8, 4, 19, 22]
// Output: [22, 19, 4, 8, 11, 13]

var arr=[13, 11, 8, 4, 19, 22]

class Stack{
constructor(input){
this.inp=input;
this.out=[]
this.add=function(){
for(var i=this.inp.length-1;i>=0;i–){
this.out.push(this.inp[i])
}

        // console.log(this.out)
    }

}
read(){
    console.log(this.out)
}

}

var output=new Stack(arr)
output.add()
output.read()

@nagesh28katke

Correct, keep it up.