+ 1
NEED EXPLANATION FOR OUTPUT PLEASE
c5 : function(){ let Lang = ['java', 'C', 'C++', 'C#', 'python']; let x = Lang.pop(); let y = Lang.push('koltin'); console.log(x); // output => python console.log(y); // output => 5 console.log(y+x); // output => 5python }
1 Resposta
+ 4
pop() Removes the last element of an array, and returns that element
push() Adds new elements to the end of an array, and returns the new length
source:(W3Schools)https://www.w3schools.com/jsref/jsref_obj_array.asp