Strip The First N Number Of Characters Off A String In JavaScript
January 2025
const value = "alfa-bravo";
const updated = value.;Notes
-
Using
.slice()over.substring()because.slice()can use negative numbers (need to test if.substring()can as well -
Both
.slice()and.substring()can have ending index as well (e.g..slice(3, 5))
end of line