Is there a way to encode a string into base64 in Chrome's Developer tools console -


is there way in developer tools console encode string base64?

for example, following:

$('input').value = base64encode("my string"); 

to base64 encode string can use btoa function

https://developer.mozilla.org/en-us/docs/web/api/windowbase64/atob

for example, use:

$('input').value = window.btoa("my string");