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
Created at: 2018/06/17 20:03; Updated at: 2018/06/20 08:23