DEV Community

Discussion on: Let's Solve: Code Challenge - Picking Numbers

Collapse
 
rattanakchea profile image
Rattanak Chea • Edited

The solution and explanation are great.

var n = parseInt(readLine());
    a = readLine().split(' ');

should be using , instead of ;. And make use of a meaning name. I would also look into making use of built-in Map in ES6.

var n = parseInt(readLine()),
    numbers = readLine().split(' ');


`