PHP version:
echo strlen("Douglas Adams")+strlen("born on")+array_sum(array(1,9,5,21,0,3,1,19,5,2)); /* array(1,9,5,21,0,3,1,19,5,2) => March 11, 1952 */ JavaScript version:
console.log("Douglas Adams".length + "born on".length + [1,9,5,21,0,3,1,1]9,5,2].reduce(function(previousValue, currentValue, index, array){return previousValue + currentValue;})); /* [1,9,5,21,0,3,1,1]9,5,2] => March 11, 1952 */ Output:
42