Skip to content

Instantly share code, notes, and snippets.

@mijankarim
Created June 11, 2023 07:08
Show Gist options
  • Save mijankarim/232a8cab7974d703c36961202f0b7d59 to your computer and use it in GitHub Desktop.
Save mijankarim/232a8cab7974d703c36961202f0b7d59 to your computer and use it in GitHub Desktop.
var x = [ 10, 20, 30];
var sum = 0;
for(var i = 0; i < x.length; i++){
sum = sum + x[i]
}
console.log("The sum result is " + sum);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment