Strings in Javascript?

mrdorianjames's icon

How would I input strings and manipulate strings in the js object. It seems that everytime I send a message containing a string/symbol (not a number or starts with number) it reads it as a call to a function. Can't I just send it a string message alone? Any hints ?

For Example:
1st message object that has "hello" going to left outlet of js object
2nd message object that has "world" going to right outlet of js object
Js object Output into message object "Hello World"

Christopher Dobrian's icon

Make an "anything()" function, access the first item of the incoming message with "messagename" and access the rest of the incoming message with "arguments").

function anything() {
    var themessage = arrayfromargs(messagename, arguments);
    // do whatever you want to the message here, then
    outlet(0, themessage);
}

mrdorianjames's icon

Thank you so much. I think i was trying to use that but it wasn't working. Although, I think it was user error somehow. Thank you, I needed the verification that i was on the right path .