Determine trace # given a trace

Suppose I call the function:

Plotly.addTraces("DivName’, tracedata);

How can I know the trace index/curve # assigned to that newly added trace?

It will always be added to the end of the list of traces.