Skip to content

kayashaolu/lab-play-around-with-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Lab 3: Play around with JavaScript

In this lab you will accomplish the following

  • Use JavaScript to build and run your first program

Please write the code for these three functions:

  • getMaximum(num1, num2): return the largest of the two numbers
  • getFactorial(n): return n!, which is for example 4! = 4 * 3 * 2 * 1
  • createStudent(name, id, grades) which returns a student object with the properties: name (string), id (number), and grades (an array)

Please fill out the blank stubs of the functions in the js/script.js file and run the HTML page

  • Please run index.html to check your work
  • Right click on the page and select "Inspect Element". Then click on the console tab at the bottom of the page to check any errors you have and fix them
  • If it runs successfully, you should see a series of prompts that use the three function that you have written successfully
  • Once you have written the three functions successfully and the prompts run successfully you are done

About

Play around with JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published