I am using javascript, and I want the output of the following console.log()
to be of a same length.
const str1 = 'English';
console.log(str1.padEnd(10, '.'));
const str2 = '日本語';
console.log(str2.padEnd(10, '.'));
However, the current output is as following:
> "English..."
> "日本語......."
My desired output is as following:
> "English..."
> "日本語....."
I am trying my example based on the explanation here String.prototype.padEnd()
How to achieve this?