add solution in javascript