var data = "عينات";
var num = "123";
var res = data + num; // returns عينات123
I am trying to concatenate numbers to the right side of the arabic text, but its jumping to the left side, also tried reversing the string, but didn't help.
Please suggest a solution in Javascript.
Thanks in Advance!
You can make use of Directional_Formatting_Codes:
var data = "عينات";
var num = "123";
var res = "\u202A" + data + "\u202C" + num
console.log(res);