Reputation: 4269
I have the below code that is decoding incorrectly.
btoa(atob("nirajan")) //Output: "nirajak="
but this below code works perfectly
btoa(atob("niranjan")) //Output: "niranjan"
Can somebody explain what is wrong with the first part and difference between the two code examples.
PS: Tested on Chrome
Upvotes: 2
Views: 783