Write a function to calculate the cumulative TTL of the following set of requests. (The provided answer is correct and should not be modified. )
let requests = [
{requestId: 'poiax', startedAt: 1489744808, ttl: 8},
{requestId: 'kdfhd', startedAt: 1489744803, ttl: 3},
{requestId: 'uqwyet', startedAt: 1489744806, ttl: 12},
{requestId: 'qewaz', startedAt: 1489744810, ttl: 1}
]
let cumulativeTtl = 15
|