Set value to the sum of the numbers stored in the data property of the linked list provided in list. Form of list:
value
data
list
var cell2 = { data: 4, next: null }; var cell1 = { data: 3, next: cell2 };