- HTML
- HTML page
- tags
- semantic HTML
- style tag
- script tag
- blocking: async+defer
- form tag
- input tag and variants
- CSS
- box model
- positioning
- responsiveness
- transitions
- JS
- arrays
- objects
- ES6+
- Arrow functions
- What are they?
- Arrow functions vs regular functions
- Promises and async await
- modules
- rest and spread operator
- Arrow functions
- FP in JS
- immutable array update methods
- map
- filter
- reduce
- immutable object update methods
- Object.entries
- Object.fromEntries
- immutable array update methods
- libraries
- lodash
- uuid
- browser API's
- React
- hooks
- state management
- component styling & styled-components
- design systems component libraries
- component development & Storybook
- @testing-library/react
- server side rendering & Razzle
- form management & react-hook-form
- wai-aria & Reakit
- data fetching and caching & urql
- implementing loading states: best practices
- error handling
- clean code in React
- routing & React router
- charts
- lazy loading
- concurrent mode and Suspense
- react-helmet
- NodeJS
- NestJS
- express
- apollo-server-express
- SQL
- What is SQL
- SQL DB's
- SQL vs NoSQL
- ORM's
- Why?
- Sequalize
- Postgres
- SQL GUI's
- pgadmin
- git
- staging
- committing
- commit message convections
- resetting and restoring
- branches
- rebase
- cherry-picking
- bisecting
- Analytics
- What, how, why?
- Segment
- TypeWriter
- TypeScript
- JS vs TS
- basic types
- unions and intersections
- generics
- type guards
- type assertions
- utility types
- TS and React
- ReactElement and ReactNode
- prop types
- generic components
- Yarn/NPM
- installing, upgrading and removing dependencies
- package.json
- scripts
- hooks
- Testing
- e2e testing & Cypress
- unit testing & Jest
- Networking
- HTTP
- Methods
- HTTP message format
- Encryption
- HTTP
- GraphQL
- GraphQL vs REST
- GraphQL Schema
- GraphQL Syntax
- codegen
- Serverless & AWS
- IAM: cognito
- static file storage: S3
- Docker
- Kubernetes
- load balancing
- rolling updates
- control plane
- kubelet
- Pods and workloads
- Redis
- Debugging
- UX/UI
- contrast
- fonts
- spacing
- popups
- focusing attention
- consistency
- signalling interactivity
- Cross-browser compatibility
- What are the best practices?
- Web performance
- Lighthouse
- Webpage test
- SEO
- Sitemap
- meta tags
- Github
- tracking remote branches
- PR's
- CI/CD
- Linting
- Formatting
- Formatting
- Agile software development
- Jira
Last active
August 20, 2021 07:07
-
-
Save mateja176/e32ddab3c803d7e58597e10f801a60a9 to your computer and use it in GitHub Desktop.
This file contains 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
interface Person { | |
name: string; | |
age: number; | |
gender: 'male' | 'female'; | |
student: boolean; | |
} | |
const persons: Person[] = [ | |
{ | |
name: 'Bob', | |
age: 32, | |
gender: 'male', | |
student: false, | |
}, | |
{ | |
name: 'Alice', | |
age: 30, | |
gender: 'female', | |
student: false, | |
}, | |
{ | |
name: 'Philip', | |
age: 22, | |
gender: 'male', | |
student: true, | |
}, | |
{ | |
name: 'Sam', | |
age: 24, | |
gender: 'male', | |
student: true, | |
}, | |
{ | |
name: 'Anna', | |
age: 28, | |
gender: 'female', | |
student: false, | |
}, | |
]; | |
// 1. Create a linked list out of the array, where the linked items are of the following type: | |
interface LinkedItem extends Person { | |
next: LinkedItem | null; | |
} | |
const linkedList = persons.reverse().reduce<LinkedItem[]>((list, person, i) => { | |
const next = list[i - 1]; | |
return list.concat({ ...person, next: next ?? null }); | |
}, []); | |
// const linkedList = persons.reduceRight<LinkedItem[]>( | |
// (list, person, i, array) => { | |
// const next = list[array.length - i - 2]; | |
// return list.concat({ ...person, next: next ?? null }); | |
// }, | |
// [], | |
// ); | |
console.log(linkedList); | |
// 2. Reverse the linked list | |
const reverse = (item: LinkedItem | null, people: Person[]): Person[] => { | |
if (item) { | |
const { next, ...person } = item; | |
return reverse(item.next, people.concat(person)); | |
} else { | |
return people; | |
} | |
}; | |
const people = reverse(linkedList[linkedList.length - 1], []); | |
console.log(people); |
This file contains 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
console.log(typeof (1 < 2)); | |
console.log(typeof (1 - 2)); | |
console.log(typeof true); | |
console.log(typeof !1); | |
console.log(typeof +false); | |
console.log(typeof {}); | |
console.log(typeof []); | |
console.log(typeof null); | |
console.log(typeof NaN); | |
console.log(typeof undefined); | |
console.log(typeof (() => {})); | |
console.log(typeof typeof (() => {})); | |
console.log(typeof 1 - 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment