Skip to content

Instantly share code, notes, and snippets.

@McLarenCollege
Last active January 28, 2023 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McLarenCollege/565ed3d44982e3169ccd6c6a34929384 to your computer and use it in GitHub Desktop.
Save McLarenCollege/565ed3d44982e3169ccd6c6a34929384 to your computer and use it in GitHub Desktop.
Average of two scores

Calculate the average of 2 given student scores.

CODE TEMPLATE


let score1 = 90;
let score2 = 75;
//write your code here
let average = ; // write your code here
console.log(average);

@asiauche
Copy link

asiauche commented May 4, 2022

let score1 = 90;
let score2 = 75;
let sum = score1 + score2;
let average = sum/2 ;
console.log(average);

@AmandaShashaa
Copy link

let score1 = 90;
let score2 = 75;
let summation = score1 + score2;
let average = sum / 2;
console.log(average);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment