# Interview Questions
# Questions
- What is js
bind
? How is it different from Symbols()? Binds an object to function, without using arguments. Reference it using
UseCase In EventHandling function, parameters event is binded to function and could be used with `this`this
# Linked List
class LinkedList {
constructor() {
this.head = null;
this.lenth = 0;
}
insertAtHead(data) {
const newNode = new LinkedListNode(data, this.head);
this.head = newNode;
this.length++;
}
}
class LinkedListNode {
constructor(value, next) {
this.value = value;
this.next = next;
}
}
// TESTS
// createa list from bunch of values
- What is the difference between
typeof
andinstanceof
? (opens new window) Use typof for primitive data-types and
instanceof
for custom typescallback instanceof Function typeof callback == "function"
# Resources
- https://www.thedataincubator.com/12day.html (opens new window)
- https://runestone.academy/runestone/books/published/pythonds/BasicDS/toctree.html (opens new window)
- https://dmitripavlutin.com/simple-but-tricky-javascript-interview-questions/ (opens new window)
# Problem Solving
- Drag and drop like trello
- Sum of items in array (which can containe multiple arrays recursively)
- Add drawing canvas, real editor in browser
- calculator app using react