• Log In
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Digital Systems

Department of Management Information Systems, Temple University

Digital Systems

MIS 2101.730 ■ Spring 2023 ■ Steven E. Sclarow, AIA
  • Home
  • About
    • Course Materials
    • Course Requirements
    • Email Policy
    • Grading
    • Gradebook
    • Instructor
    • Temple and COVID-19
    • Zoom Requirements
    • Zoom Links
  • Canvas Content
  • Coding Files
  • Helpdesk
  • Zoom Links
  • Video Vault
  • Diamond Peer Corner
  • Posts
    • 1a Questions
    • 1b Questions
    • 2a Questions
    • 2b Questions
    • 3a Questions
    • 3b Questions
    • 4a Questions
    • 4b Questions
    • 5a Questions
    • 5b Questions
    • 6a Questions
    • 6b Questions
    • 7a Questions

Discussion 5a JavaScript Variables

Lyzannette Figueroa - March 1, 2023 1 Comment

Hello everyone,

JavaScript can be a little confusing when you first start learning how to use it, one of the first things that is important to learn about is Variables. We use variables as names for different containers with different locations within a code. To begin using a variable you want to start by tying “var myText ” into your coding program, throughout this semester in MIS we used Visual Studio Code (VSC) but there are different coding programs available. When you type “var myText” you are creating a container that you can fill with anything you want. For this example, I will be assigning myText as “Good luck, everyone!” In VSC if I wanted to have my text pop on to screen, I create it as an alert. It this will look something like this, 

>script>

  var myText =  “Good luck, everyone!”

  alert(myText);

</script>

That means when I run the program the words “Good luck, everyone!” will pop on screen as a notification. The text can be anything you want it to be, and it can be used multiple times throughout your code. This is important to know because you do not want to continue repairing certain lines of code. One question that always comes up when talking about naming variables is, is there a specific way we must name them? The answer is yes, JavaScript is lenient about how you name your containers but there are still rules that need to be followed. Variables must never start with a number, they can start with different symbols like underscores, or dollar signs, as well as uppercase and lowercase letters. You must also remember that you cannot have any spaces between names of variables. These are just some of the rules you must follow when naming variables. 

Reader Interactions

Comments

  1. Jessica Giare says

    March 2, 2023 at 7:32 pm

    Hi Sheree! I definitely agree that Javascript is a bit complicated at first. When learning variables it was hard to grasp at first sight but after practicing and reading a little more about it, it’s not as intimidating. This reminds me of our in-class activity, which I also think was helpful in fully understanding the use of variables and how to correctly input them into Javascript. Do you think that variables were an easier concept to learn versus loops, strings, etc? I think that since variables is such a concept that really ground breaks the rest of the factors to learn, I think variables were great to learn first and truly understand them.

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

ANNOUNCEMENTS & POSTS

What is HTML and how it is used in our everyday lives! Part 2

The coding language that adds design elements to a web page is Cascading … [More...] about What is HTML and how it is used in our everyday lives! Part 2

What is HTML and how it is used in our everyday lives! Part 1

The coding language that adds structure to a web page is HTML (Hypertext … [More...] about What is HTML and how it is used in our everyday lives! Part 1

What are Loops?

Why do we use loops? Loops are used in programming to execute a set of … [More...] about What are Loops?

Importance of IF/ELSE Statements!

Why do we use if/else statements? We use if/else statements in programming … [More...] about Importance of IF/ELSE Statements!

The Functioning of JavaScript

A function in JavaScript is a block of code designed to perform a specific … [More...] about The Functioning of JavaScript

What does JavaScript mean to you? Read more to find out what it means to Shivam Joshi!

A variable in JavaScript is a container that holds a value, which can be a … [More...] about What does JavaScript mean to you? Read more to find out what it means to Shivam Joshi!

ITA CONTACT INFO

Tarisha Sarker - Diamond Peer

Email: tarisha.sarker@temple.edu
Office Hours: Monday, 3-5 PM
Zoom Link: https://temple.zoom.us/j/91454347337

Instructor

Steven E. Sclarow, AIA

Email: sclarow@temple.edu
Office Hours Availability: M | W, 9:30 - 10:30 AM, or by appointment. Please email me if you need to schedule an appointment outside of my normal office hours.
Zoom Link: https://temple.zoom.us/j/96464375557

Helpful Links

FOX Laptop Policy

Gradebook

Installing-VS-Code-Windows
Installing-VS-Code-Mac-OS

Copyright © 2025 · Department of Management Information Systems · Fox School of Business · Temple University