-4

以下のコードでは、34 未満の「years_of_experience」と「texas」に等しい出生地の値を出力したいと考えています。しかし、ステートメントを正しく書く方法がわかりません

var  employees = [
    {
       name1:'jacob',
       age2 : 23,
       date_of_join : 23/03/2013,
       years_of_experience : 12,
       birth_place: "virginia" 
    },
    {
       name2:'sheldon',
       age2 : 34,
       date_of_join :2/03/2013,
       years_of_experience : 15,
       birth_place: "lisbon"  
    },
    {
       name3:'johnny',
       age3 : 25,
       date_of_join :29/03/2013,
       years_of_experience : 13,
       birth_place: "texas"  
    }];

    employees.forEach(function(a) {
        console.log(a);
     });
        for(var i = 0;i <= employees.length;i++)
            {
                if(employees[i]!= -1)
                {
                    console.log("gotcha");
                    if(employees.hasOwnProperty === years_of_experience) < 34 || (employees.hasOwnProperty(birth_place) === "teaxs")
                    {
//here i want to print the values of  
//  "years_of_experience"  which is less than 34 and birthplace which is equal to   
// "texas".But i'm not getting how to write the statement for that become m new to 
// javascript and even m not sure i've written the conditional statement right,
// please correct it and help me.. 


                    }
                }
            }
4

3 に答える 3