how to delete the last part of a string in node js
snippet in javascript

how to delete the last part of a string in node js

user2971

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