Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Welcome to the Translator's Quote Lines

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:

Language: Program Output
(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:

Language: Program Output
5

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.