Home Javascript How to remove particular value from jquery array?

How to remove particular value from jquery array?

by Shahriar Sagor
remove particular value from jquery array

Today now in this post i will show how to remove particular value from jquery array. Some days ago when i was working on my code PHP project, at that time i need to remove the specific items value from my javascript array. So here i make a google search and try solve that but now i would like to share in my site. How to remove value from javascript array.

So, let’s see how to use:

Example:

var languages = ['php', 'laravel', '.net', 'java', 'c#', 'javascript']
var deleteLanguage = 'laravel';
languages = jQuery.grep(languages, function(value) {
  return value != deleteLanguage;
});
console.log(languages);

Read Also : How to Create Custom Blade Directive in Laravel?

Thanks for read. I hope it help you. For more you can follow us on facebook.

close

You may also like