Course / Build Lab / JavaScript for Python people
JavaScript for people who just learned Python
Same ideas, different punctuation. Python is for analysis in this course; JavaScript runs your app in the browser.
| Idea | Python | JavaScript |
|---|---|---|
| A list of numbers | | |
| Length | | |
| Average | | |
| Loop | | |
| Function | | |
| Dictionary / object | | |
| Read a CSV | | |
Three traps: JavaScript indexes from 0 like Python but has no negative indexes (hr.at(-1) instead of hr[-1]); == converts types, so use ===; and reading a file is asynchronous, so you await it.