2

I have an array which holds a list of array and the value is in ‘dollars’.
I need to take the max price and min price from that list.

This is what have tried,

var _array = [$1.09,$3.07,$2.223];
var number = Number(_array.replace(/[^0-9.]+/g,""));
a= Math.max.apply(Math,number); // $3
b= Math.min.apply(Math,number); // $1

But its not working, can anyone please help me out.

Demo Link