Reading Notes

Showcasing my progress during the TechEducator Full-Stack MERN Bootcamp. Explore through the 'Class Content' or read about me below!

View the Project on GitHub cailumleyshon/reading-notes

Week 1 Class 6



“What are variables in JavaScript?”


Variables in JavaScript are containers that store data, such as numbers, text, or objects, for later use in a program. They allow developers to manipulate and work with different types of data dynamically during script execution. The 3 types of JavaScript variables are var, let and const, although var is function-scoped and “outdated” (hence the introduction of let and const) therefore it is discouraged to use var.


“What does it mean to declare a variable?”


To declare a variable in JavaScript means to define its name and allocate memory to store data. It tells the interpreter that a variable with a specific identifier exists and can be used to store values. Example:

let age;
age = 52;

or together…

let age = 52;

“What is an ‘assignment’ operator, and what does it do?”


An “assignment” operator in JavaScript, denoted by “=”, is used to assign a value to a variable. It takes the value on the right side and assigns it to the variable on the left side. For example, x = 10; assigns the value 10 to the variable “x.”


“What is information received from the user called?”


Information received from the user in JavaScript is typically referred to as “user input” or “user data.” It can be collected through various methods like input fields in web forms, user prompts, or event handling, allowing developers to interact with and respond to user actions in their programs.