Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

array of objects for in

const mobiles = [
    {
        brand: 'Samsung',
        model: 'Galaxy Note 9'
    },
    {
        brand: 'Google',
        model: 'Pixel 3'
    },
    {
        brand: 'Apple',
        model: 'iPhone X'
    }
];

mobiles.forEach(mobile => {
    for (let key in mobile) {
        console.log(`${key}: ${mobile[key]}`);
    }
});
Comment

PREVIOUS NEXT
Code Example
Typescript :: unable to connect to postgresql server fatal password authentication failed for user 
Typescript :: typescript formik useFormik 
Typescript :: check if document exists mongodb python 
Typescript :: stretch grid column to fit page mui 
Typescript :: Please make sure you have the correct access rights and the repository exists. 
Typescript :: check if key is in the js object 
Typescript :: getstaticpaths in nextjs 
Typescript :: sort two lists that refence each other 
Typescript :: get key of enum typescript 
Typescript :: class validator enum 
Typescript :: advantages of automation 
Typescript :: close mat dialog from component 
Typescript :: How to fix warning "function -- makes the dependencies of useEffect Hook change on every render"? 
Typescript :: too many requests jquery laravel 
Typescript :: pandas value_counts sort descending 
Typescript :: ternary operator typescript 
Typescript :: how to sort documents in firebase database date wise 
Typescript :: typescript usestate array type 
Typescript :: react vimeo player 
Typescript :: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:3000: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted. 
Typescript :: if image is broken show alternative image angular 
Typescript :: typescript class interface 
Typescript :: arrow function in typescript 
Typescript :: number of elements in list in python 
Typescript :: Catch clause variable cannot have a type annotation. 
Typescript :: typescript list concat 
Typescript :: from date and to date validation in angular 9 
Typescript :: typescript returntype remove promise 
Typescript :: unresolved import requests python 
Typescript :: typeorm find with limit 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =