DEV Community

Syahiruddin Daud
Syahiruddin Daud

Posted on

I need help πŸ˜΅β€πŸ’« with a 🚨coding problem. I can't seems to get it to console log the string...😩 Am I missing something here? πŸ€”πŸ§

Image description

The code:

const str = 'QXByaWwncyBGb29sIQ==';

function decodeStr(str) {
  const result = atob(str);
  console.log(result)
  return result;
}


decodeStr(str);
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
mxglt profile image
Maxime Guilbert

It seems good
If you are not able to see the console.log, it can be related to an error when calling the code before.
So you can try to add a console.log in the first line of your function (just to be sure you are able to call your method) and then you should be able to see if everything goes right