Skip to content

Instantly share code, notes, and snippets.

View akankshach29's full-sized avatar

Akanksha Choudhary akankshach29

View GitHub Profile
[
{
"title": "Dilwale Dulhania Le Jayenge",
"releaseYear": 1995,
"genre": ["Romance", "Drama"],
"director": "Aditya Chopra",
"actors": ["Shah Rukh Khan", "Kajol"],
"language": "Hindi",
"country": "India",
"rating": 9.1,
@akankshach29
akankshach29 / A5.11_HW_2.js
Created October 6, 2024 15:06
A5.11_HW_2
const productsData = [
{
id: 1,
productName: "Laptop",
price2021: 19999,
price2022: 18999,
price2023: 15090,
brand: "Dell",
productRating: 5
},
@akankshach29
akankshach29 / A5.11_HW_1.js
Created October 6, 2024 15:03
A5.11_HW_1
const studentData = [
{ studentName: "John", rollNo: 201, science: 88, history: 75, geography: 90 },
{ studentName: "Alice", rollNo: 202, science: 92, history: 85, geography: 88 },
{ studentName: "Bob", rollNo: 203, science: 78, history: 89, geography: 91 }
];
const studentData = [
{ name: "Anu", rollNo: 101, hindi: 80, english: 75, maths: 90 },
{ name: "Priya", rollNo: 102, hindi: 85, english: 70, maths: 95 },
{ name: "Ravi", rollNo: 103, hindi: 78, english: 92, maths: 87 }
];
const studentsData = [
{ name: "Rahul", rollNo: 101, hindi: 80, english: 75, maths: 90, computers: 88, science: 82, totalMarks: 415, avgMarks: 83 },
{ name: "Amit", rollNo: 102, hindi: 85, english: 70, maths: 95, computers: 92, science: 78, totalMarks: 420, avgMarks: 84 },
{ name: "Priya", rollNo: 103, hindi: 78, english: 92, maths: 87, computers: 95, science: 90, totalMarks: 442, avgMarks: 88.4 },
{ name: "Kaveri", rollNo: 104, hindi: 89, english: 95, maths: 96, computers: 98, science: 91, totalMarks: 469, avgMarks: 93.8 }
]
@akankshach29
akankshach29 / A5.12_HW_2.js
Created October 6, 2024 14:54
A5.12_HW_2
const productsData = [
{ id: 101, name: "Laptop", price: 999.99, brand: "Dell", category: "Electronics", rating: 4.5 },
{ id: 102, name: "Smartphone", price: 599.99, brand: "Samsung", category: "Electronics", rating: 4.0 },
{ id: 103, name: "Running Shoes", price: 79.99, brand: "Nike", category: "Footwear", rating: 4.8 },
{ id: 104, name: "T-shirt", price: 19.99, brand: "Adidas", category: "Apparel", rating: 4.2 },
{ id: 105, name: "Coffee Maker", price: 49.99, brand: "Hamilton", category: "Kitchen Appliances", rating: 4.6 }
];
@akankshach29
akankshach29 / A5.12_HW_1.js
Last active February 19, 2025 07:19
A5.12_HW_1
const studentsData = [
{ name: "Sarah", rollNo: 201, chemistry: 88, homeScience: 78, commerce: 92, physicalEducation: 90, moralScience: 85, totalMarks: 433, avgMarks: 86.6 },
{ name: "Michael", rollNo: 202, chemistry: 75, homeScience: 90, commerce: 85, physicalEducation: 94, moralScience: 88, totalMarks: 432, avgMarks: 86.4 },
{ name: "Emily", rollNo: 203, chemistry: 82, homeScience: 95, commerce: 88, physicalEducation: 92, moralScience: 90, totalMarks: 447, avgMarks: 89.4 },
{ name: "David", rollNo: 204, chemistry: 95, homeScience: 96, commerce: 94, physicalEducation: 99, moralScience: 99, totalMarks: 483, avgMarks: 96.6 },
{ name: "Olivia", rollNo: 205, chemistry: 85, homeScience: 92, commerce: 89, physicalEducation: 91, moralScience: 86, totalMarks: 443, avgMarks: 88.6 }
];
@akankshach29
akankshach29 / git-clearHistory
Created April 10, 2020 09:56 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
The JavaScript Round:
Closure
Call, Bind, Apply
Map, reduce, filter, splice, slice
Prototypical Inheritance
Scope: The ‘this’ keyword
The ‘new’ keyword
New ES6 Features
Why Arrow Functions?
let, const, var
@akankshach29
akankshach29 / mongodbcommands.txt
Created August 21, 2017 06:29
Mongo DB commands frequently used
Mongo DB unlike relational database, is a JSON-like document oriented database. The mongo shell is an interface used to add, query, update, etc data.
Here’s a cheat sheet of Mongo Shell commands often used:
1 Login to the server
2 Type `mongo` to get the mongo terminal
To create a new database:
use database_name
To See the list of all database present: