Day 0: Task 2: Data Types
10 Days of JavaScript
Last updated
Was this helpful?
10 Days of JavaScript
Last updated
Was this helpful?
Today, we're discussing data types. Check out the attached tutorial for more details.
Variables named firstInteger, firstDecimal, and firstString are declared for you in the editor below. You must use the operator + to perform the following sequence of operations:
Convert secondInteger to an integer (Number type), then sum it with firstInteger and print the result on a new line using console.log
.
Convert secondDecimal to a floating-point number (Number type), then sum it with firstDecimal and print the result on a new line using console.log
.
Print the concatenation of firstString and on a new line using console.log
. Note that firstString must be printed first.