i'm trying to edit html using javascript statement that includes numeral variable concatenated with arabic string this is an example for my code:
<html>
<body>
<p id="example"></p>
<script>
var x = "متر ";
var y = 5;
document.getElementById("demo").innerHTML = y + x;
</script>
</body>
</html>
the result that I want is the var y
before the var x
so it would show as rtl but im always getting it as ltr
i really hope that i explained the issue properly any help?
` tag and change `y+x` to `x+y` moreover, your `id="example"` so `getElementById("demo")` is wrong.
– abdul qayyum Feb 27 '18 at 11:01