text: `use strict`;
  function script5() {
  
  const products = [
    { name: "Радар", price: 1300, quantity: 4 },
    { name: "Сканер", price: 2700, quantity: 3 },
    { name: "Дроид", price: 400, quantity: 7 },
    { name: "Захват", price: 1200, quantity: 2 }
  ];
  
  let getAllPropValues = function(products, prop) {
    const values = [];
    for (const item of products) {
      if (prop in item) {
        values.push(item[prop]);
      }
    }
    return values;
  };
  console.log(getAllPropValues(products, "name")); // ['Радар', 'Сканер', 'Дроид', 'Захват']
  
  console.log(getAllPropValues(products, "quantity")); // [4, 3, 7, 2]
  
  console.log(getAllPropValues(products, "category")); // []
  }
  
  
  
  