Categories

Wednesday, December 25, 2024
#919814419350 therichposts@gmail.com
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

therichpost
the authortherichpost
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 19, MedusaJs, Next.js, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

Leave a Reply

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