Light Mode
Dark Mode
Problem with the generated code in js

The example code in js is given with tuples in Python-style : (2,3) You should replace all () with []

bad: addFractions(((2, 3), (2, 3))) == "1 and 1/3"

good: addFractions([[2,3],[2,3]]) == "1 and 1/3";

I think in in js (2,3) is an operation between 2 and 3 with comma operator and it returns the last operand so just 3

  • task.fractions-addition
Created: June 17, 2018, 8:03 p.m.
Updated: June 20, 2018, 8:23 a.m.
2
1
User avatar
Kebml