Here is my code:

```
var complexNumberMultiply = function(a, b) {
var a1 = parseInt(a),
b1 = parseInt(b),
c = a1*a1-b1*b1,
d = a1*b1*2;
if(c<0){str = '-'+Math.abs(c)+'+'+d+'i';}
else if(d<0){str = c+'+'+'-'+Math.abs(d)+'i';}
else{str = c+'+'+d+'i';}
return str;
};
```

When the input is "1+-1i", I console.log() the output in Chrome. It is "0+-2i", which is the expected result.

But when I submit, it shows the output is "0+2i"!

I've tried several methods but still don't know where I am wrong.Can anyone tell me why? Thanks a lot!