Flat an array | JS interview question | Easy problem

Published --