Joining variables & words

(Probably) I haven’t seen this feature in Hopscotch,
join _____ & ______
So we can add variables, or text. So it joins 2 words to 1 (but maybe you must add space to give it a space). So we don’t need to add much objects. If it is already on Hopscotch, sorry :disappointed:.
Example:
join Your code is & CodeVariable

10 Likes

Do you mean something like boolean?

Otherwise nice thinking!

1 Like

No, but like this.
Maybe you create a random number, or you code to pick random number. That uses variables, and for example you named it as “Code”.
The output will be like this (example):
Your code is 13625342
So, we join the “Your code is” and the variable “Code”.

2 Likes

Oh so like you have 1 variable that’s “2” for example and you join in with “3”, now you have 23?

1 Like

I don’t get what you’re saying

1 Like

I understand! What you are talking about is that you want to be able to combine text with variables and even variables with other variables when you set the text of an object, right?

Here is some pseudo-code to better show what I think that you mean:

#Example 1: Joining two variables
question = "How old are you? "
answer = "I am 15 years old."
set text question + answer #Output: How old are you? I am 15 years old. (in one statement)
#Example 2: Joining a variable with text or text with a variable
name = "Eric"
set text "My name is " + name

This would be much better together with string variables, so those would probably also have to be implemented in Hopscotch to make this work.

But yeah, awesome idea!

6 Likes

This might help…

  • This is a great idea!
  • Eh, don’t really want it.

0 voters

1 Like

Correct @William04GamerA

3 Likes

Ah, just like the Scratch block!

2 Likes

Awesome! Yep, this would be so convenient to have. It has been suggested before too, I think, so it is definitely something that people want!

2 Likes