let arr = ["c++", "nodejs", "php", "python", "go"];
let shifted = arr.shift();
console.log(arr);
console.log(shifted);
shifted = arr.shift();
console.log(arr);
console.log(shifted);
/*
run:
[ 'nodejs', 'php', 'python', 'go' ]
c++
[ 'php', 'python', 'go' ]
nodejs
*/