Write a function named remove that takes an argument named list, which is the head of a linked list, and value, which is a number, and removes the first cell containing the value if there is one, and returns the list. If no cell contains the value, the list should be returned unchanged. Code to construct an example linked list in the form used in the tests is given below.

var tail = { next: null };
var cell2 = { data: 12, next: tail };
var cell1 = { data: 45: next: cell2 };
var head = { next: cell1 };

javascript programming
exercise: functions 05c