Skip to content

Instantly share code, notes, and snippets.

View nnnkit's full-sized avatar
🎯
Focusing

Ankit nnnkit

🎯
Focusing
View GitHub Profile
@nnnkit
nnnkit / array.js
Created May 9, 2022 13:58
Array implementation using Object
class MyArray {
constructor(arr = []) {
this.value = arr.reduce((acc, cv, i) => {
acc[i] = cv
return acc
}, {})
}
get length() {
return Object.keys(this.value).length
}

Closure

  1. Call the function below in such a way that it returns 40.
let a = 10;
function sum(b) {
  return function (c) {
    return function (d) {
 return function (e) {
[
{
"id": "rec6d6T3q5EBIdCfD",
"name": "Best of Paris in 7 Days Tour",
"info": "Paris is synonymous with the finest things that culture can offer — in art, fashion, food, literature, and ideas. On this tour, your Paris-savvy Rick Steves guide will immerse you in the very best of the City of Light: the masterpiece-packed Louvre and Orsay museums, resilient Notre-Dame Cathedral, exquisite Sainte-Chapelle, and extravagant Palace of Versailles. You'll also enjoy guided neighborhood walks through the city's historic heart as well as quieter moments to slow down and savor the city's intimate cafés, colorful markets, and joie de vivre. Join us for the Best of Paris in 7 Days!",
"image": "https://dl.airtable.com/.attachments/a0cd0702c443f31526267f38ea5314a1/2447eb7a/paris.jpg",
"price": "1,995"
},
{
"id": "recIwxrvU9HfJR3B4",
@nnnkit
nnnkit / endpoints.md
Created October 4, 2021 06:28
Blog App Endpoints

Endpoints

Authentication Header:

You can read the authentication header from the headers of the request

Authorization: Token jwt.token.here

Authentication:

@nnnkit
nnnkit / button-component.md
Last active September 9, 2021 17:59
Button Component Usign Props

Button Component

Properties That The Button Component Can Be Passed

Property Description Type Required
disabled Sets the button to a disabled state boolean false
label The button text string true
onClickHandler The action to be dispatched onClick function true
size The size of the button ButtonSizes false
@nnnkit
nnnkit / react-movie-watchlist.md
Created September 1, 2021 04:34
React Movie Watchlist App

Movie Watch List App

Create a movie watch list app with the following features.

  • Allow users to add movies to the list
  • By default the button will say "To Watch"
  • You can click on the button to make change the status to "Watched"
  • Take a look at the demo to understand it better

Movie Watch List App

@nnnkit
nnnkit / projects.md
Created April 30, 2021 05:15
Projects done by students of AltCampus during the Full Stack Web Development Course

Description (About the video)

When you are learning a new language, you should always know the why and the possibilities it will unlock. In this video we will learn about why we should learn JavaScript. We will also learn about the things we can build after learning JavaScript.

🚀 Try our free trial on becoming a full stack web developer : https://try.altcampus.school/?utm_source=youtube

Course Description: A programming bootcamp designed to help you develop full-stack web development skills and become job-ready.

  • It is 100% online
  • Step-by-step learning content including explanatory videos, assignments, and real life projects.
@nnnkit
nnnkit / playlist.md
Last active January 12, 2021 08:51
Playlist Time Count

Create a button for youtube playlist to calculate total time of a playlist.

@nnnkit
nnnkit / cloning-objects-and-array.md
Last active January 15, 2021 01:10
Cloning Array and Objects
  1. Clone the array given below person into a new varibale named clonedPerson
let person = [
  {
    input: { name: 'Ryan' },
    output: { name: 'Ryan' },
  },
  {
    input: { name: { first: 'Ryan', last: 'Haskell-Glatz' } },