Answer the question
In order to leave comments, you need to log in
String concatenation?
for example, there is this. expression
let I = 'b'+'a'
is it possible to somehow refer to a and b? (except for working with a ready-made string i)
for example, by array index or something else
in a real example, these are strings of different content and length
Answer the question
In order to leave comments, you need to log in
I don't know if I understood the question correctly:
var a= 'a', b= 'b';
b= b.toUpperCase();
var i= a+b;
no
PS. but you can save these 'a' and 'b' in separate variables before, concatenate them, but the original strings will remain in these variables
If I understand the question correctly, then something like this
const a = 'Mary';
const b = 'Hello';
console.log(`${a}, how are you? ${b}`);
console log(a+b);
console log(a);
console log(b);
I didn't understand the question. Where do these lines come from?
After the merging, it is no longer possible to divide back, since the I
information about the gluing boundary has been lost in the variable. But it is possible if this information is stored somewhere - for example, in the form of the length of at least one of the original strings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question