GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Basic-To-Advanced-JavaScript/ArrayOFObject/app.js at main · MaazWebDev/Basic-To-Advanced-JavaScript Expand file tree/ Copy pathapp.jsMore file actions 185 lines (179 loc) · 3.95 KB / Copy pathapp.jsFile metadata and controls185 lines (179 loc) · 3.95 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 const students = [ { name: "Aarav Singh", fatherName: "Rajesh Singh", rollNo: "001", marks: 85, topics: ["Mathematics", "Physics", "Chemistry"], }, { name: "Meera Sharma", fatherName: "Suresh Sharma", rollNo: "002", marks: 90, topics: ["Biology", "Chemistry", "Mathematics"], }, { name: "Rohan Gupta", fatherName: "Anil Gupta", rollNo: "003", marks: 78, topics: ["History", "Geography", "Political Science"], }, { name: "Ananya Verma", fatherName: "Pankaj Verma", rollNo: "004", marks: 88, topics: ["English", "Mathematics", "Computer Science"], }, { name: "Vikram Mehta", fatherName: "Sunil Mehta", rollNo: "005", marks: 92, topics: ["Physics", "Chemistry", "Mathematics"], }, { name: "Sneha Patel", fatherName: "Mahesh Patel", rollNo: "006", marks: 81, topics: ["Biology", "Chemistry", "Physics"], }, { name: "Rahul Jain", fatherName: "Vikas Jain", rollNo: "007", marks: 76, topics: ["Mathematics", "Computer Science", "Physics"], }, { name: "Priya Kumar", fatherName: "Arun Kumar", rollNo: "008", marks: 84, topics: ["History", "Geography", "Economics"], }, { name: "Nikhil Roy", fatherName: "Amit Roy", rollNo: "009", marks: 89, topics: ["Mathematics", "Physics", "Computer Science"], }, { name: "Isha Desai", fatherName: "Ravi Desai", rollNo: "010", marks: 93, topics: ["Biology", "Chemistry", "Physics"], }, { name: "Amit Malhotra", fatherName: "Vivek Malhotra", rollNo: "011", marks: 77, topics: ["History", "Political Science", "Economics"], }, { name: "Kavya Kapoor", fatherName: "Raj Kapoor", rollNo: "012", marks: 91, topics: ["Mathematics", "Physics", "Computer Science"], }, { name: "Sahil Reddy", fatherName: "Prakash Reddy", rollNo: "013", marks: 86, topics: ["Biology", "Chemistry", "Mathematics"], }, { name: "Anushka Singh", fatherName: "Ravi Singh", rollNo: "014", marks: 80, topics: ["History", "Geography", "Political Science"], }, { name: "Rajiv Nair", fatherName: "Vinod Nair", rollNo: "015", marks: 87, topics: ["Physics", "Chemistry", "Computer Science"], }, { name: "Divya Joshi", fatherName: "Ramesh Joshi", rollNo: "016", marks: 79, topics: ["Mathematics", "English", "Computer Science"], }, { name: "Arjun Rao", fatherName: "Sanjay Rao", rollNo: "017", marks: 83, topics: ["Physics", "Mathematics", "Computer Science"], }, { name: "Snehal Patel", fatherName: "Nitin Patel", rollNo: "018", marks: 94, topics: ["Biology", "Chemistry", "Physics"], }, { name: "Kabir Das", fatherName: "Manoj Das", rollNo: "019", marks: 82, topics: ["History", "Geography", "Political Science"], }, { name: "Pooja Sharma", fatherName: "Ashok Sharma", rollNo: "020", marks: 95, topics: ["Mathematics", "Physics", "Chemistry"], }, ]; var table = document.getElementById("user_table"); students.forEach((data, ind) => { // console.log("ind==>", data, ind); let tr = `<tr> <td>${ind + 1}</td> <td>${data.name}</td> <td>${data.rollNo}</td> <td>${data.marks}</td> </tr>`; table.innerHTML += tr; }); const above90 = students.filter((data) => data.marks >= 90); const above80 = students.filter((data) => data.marks >= 80 && data.marks < 90); function showAbove80() { table.innerHTML = ""; above80.forEach((data, ind) => { let tr = `<tr> <td>${ind + 1}</td> <td>${data.name}</td> <td>${data.rollNo}</td> <td>${data.marks}</td> </tr>`; table.innerHTML += tr; }); } function showAbove90() { table.innerHTML = ""; above90.forEach((data, ind) => { let tr = `<tr> <td>${ind + 1}</td> <td>${data.name}</td> <td>${data.rollNo}</td> <td>${data.marks}</td> </tr>`; table.innerHTML += tr; }); } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |