Angular 9 – how to remove last array element?

Angular 9, Angular 10

Here to all, welcome to therichpost.com. In this post, I will tell you, Angular 9 – how to remove last array element?

Here is the code snippet and you can add this into to your app.component.ts file:

let array_1 = [1,2,3,4];
array_1.splice(-1,1)  //  output--> array_1 = [1,2,3]

If you have any kind of query then please comment below.

jassa

Thanks