How do I run my js code in my terminal?

I have started learning the Full Stack Engineer and I am going through INTRODUCTION TO NODE.JS (https://www.codecademy.com/paths/full-stack-engineer-career-path/tracks/fscp-22-introduction-to-back-end/modules/wdcp-22-back-end-javascript-with-node-js/lessons/intro-to-node-js/exercises/the-os-module).
My question is, as I am learning how to run node.js with in CodeAcademy lessons and at the same time using my own terminal, I do not know how to run my js code in my terminal like I do in Code Academy.
I open my terminal and type “node” to navigate to node in the terminal, but how do run a js script once you are in node.js?
In CodeAcademy, you write your javascript code and then in the terminal click run, but how do I do that in my own terminal?
I hope this makes sense.

Thank you,
Mark Morse