Practice: Data Types and Arithmetic Operators

Try this exercise to practice writing statements using numbers, strings, and Boolean values. The code defines three variables (using the 'var' keyword) and uses assignment statements. Copy and paste the code into each program and run it to validate the output. You can use the Replit online editor at https://replit.com/languages/nodejs or any editor you choose. This exercise does not count towards your grade. It is just for practice!

Overview

The following examples demonstrate using data types, arithmetic operations, and input in JavaScript statements.


Source: Dave Braunschweig, https://press.rebus.community/programmingfundamentals/chapter/javascript-examples-2/
Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 License.