---
id: 69bab8292750d84cac5b52a0
title: Step 2
challengeType: 1
dashedName: step-2
---

# --description--

In this workshop, throughput refers to the total number of attendees processed by a gate across all ticks in a single simulation (morning or night). Your `initializeThroughput` function will prepare an object to track how many attendees each gate processes.

First, create an empty object named `summary`.

# --hints--

Inside your `initializeThroughput` function, create an empty object and assign it to a variable named `summary`.

```js
const funcStr = __helpers.removeJSComments(initializeThroughput.toString());
assert.match(
  funcStr,
  /(var|let|const)\s+summary/,
  "You must have at least one space between the declaration keyword (let/const) and 'summary'"
);
const cleaned = __helpers.removeWhiteSpace(__helpers.removeJSComments(initializeThroughput.toString()));
const viable_solutions = [
"functioninitializeThroughput(gates){letsummary={};}",
"functioninitializeThroughput(gates){letsummary={}}",
"functioninitializeThroughput(gates){constsummary={};}",
"functioninitializeThroughput(gates){constsummary={}}",
"functioninitializeThroughput(gates){varsummary={};}",
"functioninitializeThroughput(gates){varsummary={}}"
];
assert.include(viable_solutions, cleaned);
```

# --seed--

## --seed-contents--

```js
const morningGates = [
  { id: "North", capacity: 5, queue: [3, 6, 2, 4] },
  { id: "East", capacity: 3, queue: [2, 4, 3, 5] },
  { id: "South", capacity: 4, queue: [1, 2, 3, 1] },
  { id: "West", capacity: 2, queue: [4, 1, 2, 3] },
];

const nightGates = [
  { id: "North", capacity: 4, queue: [6, 2, 5, 1] },
  { id: "East", capacity: 2, queue: [3, 3, 4, 2] },
  { id: "South", capacity: 5, queue: [2, 1, 2, 3] },
  { id: "West", capacity: 3, queue: [5, 2, 1, 4] },
];

function initializeThroughput(gates) {
--fcc-editable-region--

--fcc-editable-region--
}
```
