Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Readme

addThree

This function takes three numbers as input and returns their sum.

Parameters

  • a: number: The first number to add.
  • b: number: The second number to add.
  • c: number: The third number to add.

Returns

  • number: The sum of the three numbers.

Example

const sum = addThree(1, 2, 3); console.log(sum); // Output: 6
1
2
3
const addThree = (a: number, b: number, c: number) => {
return a + b + c;
};
January 21, 2024