Comment supprimer la dernière partie d'une chaîne dans le nœud js

str = "hello I'm McDown...";
newStr = str.substring(0, str.length - 3); // Returns "hello I'm McDown"
McDown