Python vs JavaScript for Python Developers (Overview)
Python isn’t the only language out there, and one of the other languages frequently fighting Python for the top of the “most popular” lists isJavaScript. JavaScript is the de facto language on the web but also has a robust toolset on the server side. This course explores JavaScript from a Python programmer’s perspective.
In this course, you will learn:
- Where JavaScript comes from and where it is used
- How JavaScript’stype system is different from Python’s
- How to writefunctions in JavaScript
- The two ways of creatingobjects in JavaScript
- General language syntax in JavaScript
- Surprises and behaviors in JavaScript that Python programmers wouldn’t expect
00:00Welcome to Python vs JavaScript for Pythonistas.My name is Chris and I will be your guide. As unfortunate a factas this may be, Python isn’t available everywhere and doesn’t do everything.
00:13This is a problem being worked on, but in the meantime,there are other languages.There are a whole bunch of sites that rank programming language popularity.
00:21Python and JavaScript have routinely been in the top five for a number of years now.JavaScript is the de facto language for coding on the web.That was what it was originally written for,but it also has a robust set of capabilities on the server side as well.
00:37Join me in this courseand you will learn the basics of JavaScript through a Python programmer’s lens.I will cover JavaScript by highlighting where it is similar to your favoritelanguage, where it is different, and where knowing both can get a bit confusing.
00:50In particular, you will learn where JavaScript comes from and where it is used,how JavaScript’s type system is different from Python’s,how to write functions in JavaScript,the two different ways of creating objects, and general JavaScriptsyntax and usage. Finally,I’ll spend a lot of time on the things you might not expect—those corner cases where people new to JavaScript get caught,especially if they have assumptions coming from other languages.
01:20A quick note on versions: Most of what is covered in this course will not be specific toany versions, but for the record,I’ve tested the code using Python 3.9 and Node 14.12.0.
01:31Almost all of the JavaScript will be compliant with the ES6 definitionand I will point out anything that was introduced later than that. Finally,for the lesson on the web console, I’ll be using Firefox version 88.
01:44All the major browsers have similar console tools and you’ll be fine usingwhatever browser you’re comfortable with if you’re following along.
01:52JavaScript was originally written as a way of performing client-side formvalidation inside of web pages.If you find yourself wondering “Why did they do it that way?”it is probably because the original intent of JavaScript was fairly small-scaleand specific. Over the years,the language has grown immensely. With it being run in browsers,the many competing browser companies have had a lot of influence on thelanguage. Although JavaScript is standardized,a lot of the features were first implemented outside the standard and thenadopted. For a long time, the behavior between browsers wasn’t consistent,especially when interacting with a web page. Those days are mostly gone now,but it does explain why the language has several different ways of doing thesame thing.
02:36Although born for the web, JavaScript now exists on the server as well.Node.js allows you to run JavaScript on the command line or in a web server.This can be a powerful boost to your coding.
02:46It allows you to use the same language in the client and server.
02:52The spiritual ancestor of both JavaScript and Python is C.This means that a lot of the basic syntax like variable assignment, loops, andfunctions will feel familiar to you.
03:02Functions are first-class entities in both languages, and both provide tools forobject-oriented coding.
03:09The underlying type system in JavaScript is different from Python’s,but the differences aren’t a lotand you could probably code in JavaScript without even realizing the difference.
03:18The modern standard of JavaScript is a fairly clean language.The challenge comes from the fact that it is still backwardly compatible withold versions.
03:26If you ever heard people complaining about the move from Python 2 to Python 3,you might get a better appreciation for why that pain was necessaryas you see the hodgepodge that is JavaScript.
03:37This backward compatibility means there are two ways to create objects,two ways of declaring functions, and two ways of comparing things.If you stick to the newer version of each of these things,your life will be easier. If you’re reading other people’s code, though,no guarantees. This course covers a lot of ground. By the end,you’ll have a much better understanding of JavaScript and how it differs fromPython. I’ll admit that while creating it, I had a couple of “Oh!
04:04That’s why it does that!” moments.Hopefully, some of my pain can spare you the same.
04:11Next up, a brief history of the universe,starting with the invention of the world wide web and how that resulted inJavaScript.
Course Contents

