Hi All,
This one is doing my head in, how do you join 2 variables in EOS?
ie.
var Firstname = "Harry";
var Surname = "Potter";
var Fullname = Firstname + ' ' + surname
I'm sure it should be easy
Thanks a mil!
EOS cominbing/joining 2 variables
-
- Explorer
- Posts: 8
- Joined: Fri Oct 25, 2013 12:55 pm
-
- Explorer At Heart
- Posts: 265
- Joined: Thu Jan 03, 2013 4:55 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: EOS cominbing/joining 2 variables
Eos scripting engine should be plain JavaScript.
I don't know very much of JavaScript, but I found this: https://www.w3schools.com/jsref/jsref_concat_string.asp
I don't know very much of JavaScript, but I found this: https://www.w3schools.com/jsref/jsref_concat_string.asp
-
- Explorer
- Posts: 8
- Joined: Fri Oct 25, 2013 12:55 pm
Re: EOS cominbing/joining 2 variables
Legend! i thought i tried it... but nope! missed this one.Thamrill wrote: ↑Wed Oct 21, 2020 3:02 pm Eos scripting engine should be plain JavaScript.
I don't know very much of JavaScript, but I found this: https://www.w3schools.com/jsref/jsref_concat_string.asp
Thank you sir! you have fixed my problem.
Re: EOS cominbing/joining 2 variables
You can also just do:
or
So the code in your first post should have worked, except for the typo of 'surname' vs 'Surname' in your concatenation.
Code: Select all
string1 = string1 + string2;
Code: Select all
var string3 = string1 + string2;
Who is online
Users browsing this forum: No registered users and 9 guests