This course shows you how JavaScript writes functions: what a function hands back, how its parameters get defaults, small functions written as arrows, functions passed around as values, and named options where Python has keyword arguments. Most JavaScript functions look like their Python twins, but a few give a different answer instead of an error.
Your project is a freelance translator’s Python quote script, and you’ll port it to JavaScript.
Here’s a first taste. In Python, her quote() function hands back two results, the fee and the
turnaround, for a 6,200-word contract:
(744.0, 5)
Ported line for line to JavaScript, with return fee, days;, the function runs without an error and
logs one number, the turnaround:
5