你如何删除JS中的部分字符串?

时间:2017-12-06 17:16:05

标签: javascript

我想知道如何在JS / jQuery中删除部分字符串。

这就是我想要的:

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)

0 个答案:

没有答案