# JavaScript (ES6), 60 bytes <!-- language-all: lang-javascript --> f=(b,...a)=>eval(b.join`+`)?f(...a,b.slice(1),b.pop()?b:b):b [Try it online!](https://tio.run/##dY/PToNAEMbvPsXEC7txdgNUEWtoT3rwoIceaxMXulQaBARsNMY3MPHiUd/D5/EFfIQ6C/1DTQxhM/Obb75vd64WqorKpKhFlk/1chkHLEQppeLBQC9UykI5z5Ps5uCGD2NmBhjKKk0izRxOZZEXjA/Dfsj74bLU9w9JqZkVVxaXpVbT8yTVo6csYjaXdT6qyySbMS6rIk1qtn@d7XMZ5@WZim5ZBcEAnvcAxqAQ9GOho1pPYQIBVOsFEAOglTtVMHM5fkryUtMmxEw1XZRnVZ5qmeYzdjG6upRVk5nET4yEHBv5AVgWBME2ZAjWz9fb98c7nRb0wfr@fLXI74UvxxMTOp7sje22sql0NlA4uGqaqgXo7iIXd@imJSN0sYeHeLQxdNAmZhPt5hESRik20g7q@hiF6GGbsXLoYvMONJ/TnqsM0/wZie5sy@g5voeOsfPQpVyvCTtyaOhgz0fXb/f@Dhr7Yxs9c5ljFCc@Cs8MD9EnRP@Ju078Tzb5BQ "JavaScript (Node.js) – Try It Online")