Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

object loop

  const shots = [
            {id: 1, salary:100,name:'Win Win Maw',position:'junior'},
            {id: 2, salary:130,name:'Mg Mg',position:'junior'},
            {id: 3, salary:200,name:'KO KO',position:'senior'},
            {id: 4, salary:90,name:'Hla Hla',position:'intern'},
            {id: 5,  salary:250,name:'Ni Lar',position:'senior'},
            ];

             // over salray 200 People


            let overHPeopele = shots.filter(e => e.salary >= 200).map((e)=>e.name+'->'+e.position);
            console.log('overHPeople',...overHPeopele)
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #object #loop
ADD COMMENT
Topic
Name
1+7 =