Angular 8Angular 9Javascript

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

Ajay Malhotra
the authorAjay Malhotra
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know Wordpress, Core php, Angularjs, Angular 2, Angular 6, Angular 7, Angular 8, Angular 9, Angular 10, Angular 11, Nodejs, laravel, Codeigniter, Shopify, Squarespace, Jquery, Google Map Api, Vuejs, Reactjs, Bigcommerce etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.