কম্পিউটার টিউটোরিয়াল

জাভাস্ক্রিপ্টে নির্দিষ্ট ভ্যালু বাদ দিয়ে বাকিগুলো ফেচ করা

!= বা লজিক্যাল NOT (!) অপারেটর ব্যবহার করে নির্দিষ্ট প্রপার্টি ভ্যালু বাদ দিয়ে বাকিগুলো ফিল্টার করা যায়।

উদাহরণ

var customerDetails = [ 
    { customerName: "John", customerAge: 28, customerCountryName: "US" }, 
    { customerName: "David", customerAge: 25, customerCountryName: "AUS" }, 
    { customerName: "Mike", customerAge: 32, customerCountryName: "UK" } 
]; 
for (var i = 0; i < customerDetails.length; i++) { 
    if (customerDetails[i].customerCountryName != "AUS") { 
        console.log("The country name is=" + customerDetails[i].customerCountryName); 
    } 
}

কমান্ড: node fileName.js

আউটপুট

PS C:\Users\Amit\javascript-code> node demo179.js
The country name is=US
The country name is=UK
  1. জাভাস্ক্রিপ্ট Array.prototype.values() মেথড

  2. জাভাস্ক্রিপ্ট array.values() মেথড

  3. জাভাস্ক্রিপ্টে কনস্ট্রাক্টর থেকে মান রিটার্ন করার পদ্ধতি

  4. জাভাস্ক্রিপ্টে ফলসি ভ্যালু চিহ্নিত করা