I want to know how in JS/jQuery to remove parts of a string.
This is what I want it to do:
var room1 = "You see a ladder, an apple and an orange";
if(user has taken the apple) {
remove the word "apple" from the string 'room1'
print(room1)
I want to know how in JS/jQuery to remove parts of a string.
This is what I want it to do:
var room1 = "You see a ladder, an apple and an orange";
if(user has taken the apple) {
remove the word "apple" from the string 'room1'
print(room1)