// Write your program here, create suitable objects and put them in the args variable, so that the following code can work normally
let result;
if(args.op=="+"){
result=args.n1+args.n2;
}else if(args.op=="-"){
result=args.n1-args.n2;
}else{
result="Not supported";
}
console.log(result);
Please help me to answer the masters and gods
Top comments (2)
Use parseInt() to parse the integers.
Fixed code:
let args = [Object here]; // create suitable objects and put them in the args variable