0

Suppose I've this variable in JavaScript:

var aString = '00000'

and I want to change the value of the 4th character from '0' to 'b'. I've tried this

aString[3] = 'b'

but aString doesn't change the value. How can I do this?

JJJ
  • 32,902
  • 20
  • 89
  • 102
Alist3r
  • 556
  • 3
  • 11
  • 27
  • 1
    strings in javascript is **immutable**..refer here http://stackoverflow.com/questions/1431094/how-do-i-replace-a-character-at-a-particular-index-in-javascript – Kartikeya Khosla Nov 12 '14 at 10:04
  • jQuery doesn't have string manipulation methods (except `.trim()`). This is all pure JavaScript. – JJJ Nov 12 '14 at 10:05

0 Answers0