> The second relies on two external functions and is one line long.<p>> console.log(sum(range(1, 10)));<p>> Which one is more likely to contain a bug?<p>I'd say the second one. Because the first one is totally transparent. The second one relies on functions I can't see. Especially the "range" function may cause problems because here it generates the full range, including both delimiters, unlike the range function in e.g. python.<p>EDIT: functional programming is extremely useful, but I don't think this example really highlights the most important advantages.