message = "<yay!" if(message.startsWith("<")) { message = message.replace("<", "") } console.log(message) // output: "yay!"