# Values and Variables

Programs work with values: a price, a name, a yes or no. Learn to keep them in variables with let and const, calculate with numbers, build text with template literals, compare values, and convert between types when a number arrives as text.

Updated: November 14, 2026

## [Variables in JavaScript](https://www.ask-codey.com/courses/javascript-in-depth/topics/javascript-variables)

1. [Variables with let and const](https://www.ask-codey.com/lessons/javascript-variables-let-and-const) (Novice): A variable gives a value a name so your program can remember it, and let or const says whether that value is allowed to change.

## [Numbers in JavaScript](https://www.ask-codey.com/courses/javascript-in-depth/topics/javascript-numbers)

1. [Numbers and Math](https://www.ask-codey.com/lessons/javascript-numbers-and-math) (Novice): Work out totals, remainders and powers with JavaScript's arithmetic operators, in the order JavaScript does, and round money so it shows as dollars and cents.

## [Text in JavaScript](https://www.ask-codey.com/courses/javascript-in-depth/topics/javascript-strings)

1. [Strings and Template Literals](https://www.ask-codey.com/lessons/javascript-strings-and-template-literals) (Novice): Store text in strings, build messages from your values with template literals, and tidy and search text with length, trim, toUpperCase and includes.

## [True or False in JavaScript](https://www.ask-codey.com/courses/javascript-in-depth/topics/javascript-booleans)

1. [Booleans and Comparisons](https://www.ask-codey.com/lessons/javascript-booleans-and-comparisons) (Novice): Ask yes-or-no questions about your values with comparisons such as === and >=, and keep the true or false answer in a well-named boolean.

## [JavaScript Types](https://www.ask-codey.com/courses/javascript-in-depth/topics/javascript-types)

1. [Types and Converting Between Them](https://www.ask-codey.com/lessons/javascript-types-and-converting) (Apprentice): Tell numbers, strings and booleans apart with typeof, turn text into numbers and back with Number() and String(), and know why '5' + 3 is '53' and where NaN comes from.

## [Exercise: Coffee Shop Receipt](https://www.ask-codey.com/courses/javascript-in-depth/topics/exercise-javascript-coffee-shop-receipt)

1. [Exercise: Coffee Shop Receipt](https://www.ask-codey.com/lessons/exercise-javascript-coffee-shop-receipt) (Novice): Finish six small functions that work out a coffee shop receipt's subtotal, tax, tip and lines, using numbers, strings, comparisons and conversions, and let the tests check each one.

Source: https://www.ask-codey.com/courses/javascript-in-depth/chapters/values-and-variables-in-javascript
