Unable to Run Simple JS

I’m a lil new to coding and all but I am 100% sure that my code
"word".toUpperCase() should be able to run, since it goes just fine in other environments, like Node.js
But it’s not doing anything, when I run it all I get back is: node index.js over in the console.

Thanks for any help, and just for clarity the replit is linked below!

https://replit.com/@braedenburgess0/Test#test

https://replit.com/@braedenburgess0

Welcome to the community, @braedenburgess0!
Your code actually is working, it’s just not printing anything to the console because you never call a command to do so. If you’d like to see the output of your code, try this:

console.log("word".toUpperCase());
3 Likes

Adding on to RedCoder’s answer,

"word".toUpperCase()

returns a value, which is “WORD”. But you’re not passing that output as an input to anything, so all it does is do the toUpperCase() function, and stop.

Hope this cleared things up a bit :slight_smile:

1 Like