- I want to show you how to run a simple program
in both Python and JavaScript.
It's a programming tradition to get your program to say,
"Hello world," as your first step.
In Python, to accomplish this,
you'll use the print statement.
Python's print statement is one of the key features
that changed in Python 3.
So, if this code isn't working,
check to make sure you're on the right version.
Remember, Python 2 ended its support in January 2020.
To do something similar using JavaScript,
you should use the console.log function.
Where this gets printed
depends on where you're running your JavaScript.
If you're running it within the browser,
then your console log will be printed
in the developer console.
If you're running your JavaScript using node,
then your console.log will show up
on the terminal where you launched your program.
As you can see from even this simple example,
many of the basic building blocks
between Python and JavaScript are quite similar.
They are very complimentary languages.
So, if you already have a foundation in one,
picking up the other should be quite easy.
Similarly, they are both fairly beginner friendly.
Although, I would give the edge to Python
in terms of what I would recommend
to a brand new programmer.
So, what are you waiting for?
Make the decision today
to learn JavaScript, Python, or both.
You'll be happy that you did.