Skip to content

itscodenation/int-u3l1-23-24-student-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lesson 3.1: Variables & Data Types

Objective

Learn about variables in JavaScript, how to declare them, assign values, and manipulate their content.

What is a Variable?

  • A variable acts like a box or container storing a piece of information known as its value.
  • Example:
    let box;

Naming a Variable:

  • Variable names should be descriptive and relevant.
  • They follow the camelCase convention (e.g., userName, totalAmount).
  • Restrictions:
    • Cannot start with a number.
    • Cannot be reserved keywords (like let).

Assigning a Value:

  • After declaring a variable, we can assign a value to it.
  • Example:
    let box;
    box = 8;

Data Types:

  • Numbers: Numerical values, can be positive, negative, or decimals.
  • Strings: Series of characters enclosed within quotation marks (either single ' ' or double " ").

Operators:

  • Used to perform arithmetic operations on variables.
  • Basic ones include: +, -, *, /.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published