very new to coding and decided to start a project of mine. I watched a video on how to get it set up and started but after tinkering with it a little, I realized it was Java, not JavaScript. (Hey, i'm a noob at this) and I wanted an easier way to implement new things. this is what my main script looks like.
public void onMessage(String Message){
if(message.equals("Apples"){
sendMessage("You said apples!")}
else {
if(message.equals("Oranges" //any text
){
sendMessage("you said Oranges and" //what they put for any text
)
...
Is there a way to take the bit that says Oranges and replace it by calling a JS function from another file?