basic 1d convolution in javascript