x.concat([y*2])
Anyway, I find this to be a whole lot more sensible:
x=[]; for(y of [1,2,3,4,5]){ if(y%2===1)x.push(y*2) }
y=[1,2,3,4,5]; x=[]; // map reduce/flatmap/map/filter etc omg wtf for( i=0; i < y.length; i++ ){ if( y[i]%2 === 1 ){ x.push( y[i] * 2 ); } }
Anyway, I find this to be a whole lot more sensible:
Or even! I cant even tell what language this is but there is nothing here that needs fixing.