I am looking at this in a codebase:
let lines = data.split('\n');
this.lastLineData = lines.splice(lines.length - 1, 1)[0];
I am not seeing any difference in the above and this:
let lines = data.split('\n');
this.lastLineData = lines.pop();
is there any difference?