Construct a JavaScript function to calculate the sum of two numbers.
Here is a simple JavaScript function that calculates the sum of two numbers:

```javascript
function sum(a, b) {
  return a + b;
}
```

This function takes in two arguments `a` and `b`, which represent the two numbers you want to add together. The `return a + b;` statement calculates the sum of these two numbers and returns the result.

To use this function, you would call it with desired numbers as arguments like so:

```javascript
let result = sum(3, 5);
console.log(result); //Outputs: 8
```
Below is an instruction that describes a task, write a response that appropriately completes the request.

### Instruction:
Construct a JavaScript function to calculate the sum of two numbers.

### Response:
Here is a simple JavaScript function that calculates the sum of two numbers:

```javascript
function sum(a, b) {
  return a + b;
}
```

This function takes in two arguments `a` and `b`, which represent the two numbers you want to add together. The `return a + b;` statement calculates the sum of these two numbers and returns the result.

To use this function, you would call it with desired numbers as arguments like so:

```javascript
let result = sum(3, 5);
console.log(result); //Outputs: 8
```