const sortLines = (string) => { const newText = string .split(/ ? /) .sort() .join(" "); return newText; };