Skip to content

Valentinbejan/proiect-react5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

• Pentru un array de temperaturi în grade Celsius, am convertit fiecare temperatură în grade Fahrenheit. Array-ul inițial: [25, 30, 15, 10, 20] Array-ul rezultat: [77, 86, 59, 50, 68]

• Pentru un array de numere întregi, am afișat pe consolă fiecare număr înmulțit cu 2. Array-ul inițial: [1, 2, 3, 4, 5] Rezultatul afișat: 2, 4, 6, 8, 10

• Pentru un array de obiecte reprezentând produse, am afișat numele și prețul fiecărui produs pe consolă. Array-ul inițial: [{ name: 'Telefon', price: 1000 }, { name: 'Laptop', price: 2000 }, { name: 'Tabletă', price: 500 }] Rezultatul afișat: Telefon - 1000, Laptop - 2000, Tabletă - 500

• Pentru un array de obiecte reprezentând produse, am mapat fiecare produs într-o componentă de React numită "Product". Array-ul inițial: [{ id: 1, name: 'Telefon', price: 1000 }, { id: 2, name: 'Laptop', price: 2000 }, { id: 3, name: 'Tabletă', price: 500 }] Rezultatul: Fiecare produs a fost mapat și afișat într-o componentă "Product".

• La array-ul inițial de obiecte, am adăugat proprietatea "culoare" fără a modifica structura obiectului. Array-ul inițial: [{ id: 1, name: 'Telefon', price: 1000 }, { id: 2, name: 'Laptop', price: 2000 }, { id: 3, name: 'Tabletă', price: 500 }] Array-ul modificat: [{ id: 1, name: 'Telefon', price: 1000 }, { id: 2, name: 'Laptop', price: 2000, color: 'silver' }, { id: 3, name: 'Tabletă', price: 500 }]

• La al doilea element al array-ului "products", am adăugat o nouă proprietate "marca". Array-ul inițial: [{ id: 2, name: 'Laptop', price: 2000, color: 'gray', weight: '0.1kg' }] Rezultatul: [{ id: 2, name: 'Laptop', price: 2000, color: 'gray', weight: '0.1kg', marca: 'Samsung' }]

Desktop.2023.12.05.-.15.46.05.07.mp4

rulare:

npm install

npm install antd

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published