0

In the below code how can I use options array which is passed as a argument to drawOval

drawOval=function(options) {
    $triangle = new Triangle({
        // how can I use options array here
        // the format it accept is top:450,
        // left:500,width:200
    });
};
opt = new Array(
    top: 450,
    left: 500,
    width: 200,
    height: 200,
    fill: 'rgb(204,0,107)'
);
drawOval(opt);
Kendrick
  • 3,747
  • 1
  • 23
  • 41
deepsingh
  • 149
  • 10

1 Answers1

0

Basically I need an object not array.

opt= {
    top:100,
    left:200,
    width:200,
    height:200,
    fill:'rgb(12,0,107)'
}
drawOval(opt);
Matthias
  • 7,432
  • 6
  • 55
  • 88
deepsingh
  • 149
  • 10