Created
August 19, 2025 11:22
-
-
Save Denkotleta221/7d407877028e29e50a2f59982b5c09a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let laptop = { | |
| name : "Asus", | |
| weight: 1.2, | |
| serialNumber: "SKMF241FS1" | |
| } | |
| let charge = { | |
| name : "Charge", | |
| weight: 0.1, | |
| serialNumber: "KFSMG241NK" | |
| } | |
| let phone = { | |
| name : "IPhone", | |
| weight: 0.25, | |
| serialNumber: "MVSNA930MM" | |
| } | |
| let tings = [laptop, charge, phone]; | |
| function sort(arr){ | |
| for (let i = 0; i < arr.length; i++) { | |
| console.log(`Name: ${arr[i].name}\n Weight: ${arr[i].weight} kg,\n Serial number: ${arr[i].serialNumber}`); | |
| } | |
| } | |
| sort(tings) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment