• 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.712 ■ Summer 2022 ■ Steven E. Sclarow, AIA
  • Home
  • About
    • Course Materials
    • Course Requirements
    • Email Policy
    • Grading
    • Gradebook
    • Instructor
    • Temple and COVID-19
    • Zoom Requirements
  • Canvas Content
  • Coding Files
  • Helpdesk
  • Zoom Links
  • Video Vault
  • Diamond Peer Corner
  • Posts

week 10 blog post

Madison Gordon - June 13, 2022 2 Comments

In JavaScript, we use functions to create things and perform tasks. It is an organizational tool that creates a maintainable, reusable code. Functions work to combine code together to create something and allows for it to be easily found. It groups things together and makes your code able to be used again. They are a vital part of creating any code. The function must have a name attached to it like the one from our example in class, ‘function showDistance()’. Then they contain information about what is going to happen in this function, ‘(speed, time)’. And then with this data we attach the value to it by alerting how this information will be used, ‘alert(speed * time);’. By using something called a function call, we can input actual values to this equation that we have created through our function and get real answers. This real answer is “returned” as the value of “distance” in this case. Functions are so important to creating a simple way to determine what it is you are looking to find out, or looking to create through your code. The way it is reusable is because you can attach new values to the function call and do it multiple times, getting all the answers you are looking for. 

Reader Interactions

Comments

  1. Meghan Gemelli says

    June 13, 2022 at 7:28 pm

    Hi Madison, functions are a key component when creating a code. Functions allow you to be able to break a code down into smaller, more easily manageable pieces. You did a good job explaining why functions are important, and how you construct one.

    Log in to Reply
  2. Zac Bloom says

    June 19, 2022 at 11:09 pm

    I like how you used the example from class to explain the use of functions in Script

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

ANNOUNCEMENTS

Week 12 Questions

Loops tell the computer to run a function repeatedly. They are useful if … [More...] about Week 12 Questions

Weekly Questions: 13

When it comes to adding the structure to a web page HTML is used. When it … [More...] about Weekly Questions: 13

Week 11 Questions

The purpose of the if/else code in JavaScript is to execute a block of code … [More...] about Week 11 Questions

Weekly Questions: 12

Loops are a sequence of instructions that is repeated until a certain … [More...] about Weekly Questions: 12

Week 10 Questions

A function in JavaScript is a set of instructions that performs a task or … [More...] about Week 10 Questions

Week 9 Questions

A variable in JavaScript is the name of a storage location for data. For … [More...] about Week 9 Questions

Instructor

Steven E. Sclarow, AIA

Email: sclarow@temple.edu
Virtual Office Hour Availability: Tue, 10 - 11:00 AM, or by appointment. Please email me to schedule an appointment outside of my normal office hours.
Virtual Office: https://temple.zoom.us/j/94115790056

ITA CONTACT INFO

ITA
Name: Anna Boykis
Email: anna.boykis@temple.edu
ITA
Name: Jessica Rakhman
Email: jessica.rakhman@temple.edu

Helpful Links

FOX Laptop Policy
FOX Laptop Support

Gradebook

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

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