const truncate = (string) => { const newText = string.substring(0, 5); return newText; }; console.log(truncate("abcdefgh")); //abcde