Currently, I got let str = 'prefix'
which has length of 6, but I would like to add empty space at the end and update it to str = 'prefix '
with length of 7.
I have tried str.split("").push("").join("")
but I get error saying join is not a function.
I have also tried str[str.length] = ' '
, but this doesn't work either. What other options do I have?