how to remove one letter of a string code example
Example 1: javascript remove first character from string
var newStr = str.substring(1);
Example 2: javascript remove duplicate letters in a string
function removeDuplicateCharacters(string) {
return string
.split('')
.filter(function(item, pos, self) {
return self.indexOf(item) == pos;
})
.join('');
}
console.log(removeDuplicateCharacters('baraban'));