Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript string change character at index

let string = 'bob'
let index = 2

string = string.substring(0, index) + 'x' + string.substring(index + 1)
console.log(string)	  // [Log]: box
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #string #change #character #index
ADD COMMENT
Topic
Name
1+7 =