java code --
String plainText = "thisismyplaintext";
byte[] bytes = plainText.getBytes("UTF-8");
System.out.println(bytes);
// Output - [B@3cd1a2f1
I am trying to do the same thing in javascript but I am always getting absolutely different output like example - [11, 12, 14, 16]
.
I have tried everything from different stackoverfow answers but nothing is working similar to this java code.
Please help me to achieve the same thing in javascript and to get similar output.