Machine code round - 1 (Accordian)accordian component in react export const data = [ { id: 1, question: "what is ", answer: "sagar", }, { id: 2, question: "what is ", answer: "sagar", }, { id: 3, question: "what is ", answer: "sagar", }...May 9, 2024·1 min read
What are Closures in Javascripthow can you explain it effectively in an interviewApr 29, 2024·1 min read
Doubly Linked List Implementationclass DoublyLinkedList{ constructor(value){ this.head = { value: value, prev: null, next: null } this.tail = this.head this.length= 1 } append(value){ const newNode = { value: value, prev: null, ne...Apr 26, 2024·2 min read
LinkedList Implementationclass Node{ constructor(value){ this.value = value, this.next = null } } class LinkedList{ constructor(value){ this.head = { value: value, next: null }; this.tail = this.head this....Apr 26, 2024·1 min read
5-min frontend part-3const promise1 = Promise.resolve('First') const promise2 = Promise.resolve('Second') const promise3 = Promise.reject('Third') const promise4 = Promise.resolve('Fourth') const runPromises = async () => { const res1 = await Promise.all([promise1, ...Apr 4, 2024·1 min read
5-min frontend part-2const createMember = ({ email, address = {}}) => { const validEmail = /.+\@.+\..+/.test(email) if (!validEmail) throw new Error("Valid email pls") return { email, address: address ? address : null } } const member = ...Apr 4, 2024·1 min read
5-min frontend part - 1let randomValue = { name: "Sagar" } randomValue = 23 if (!typeof randomValue === "string") { console.log("It's not a string!") } else { console.log("Yay it's a string!") } Answer is "Yay it's a String" Let us know why So basically is a JIT ...Apr 4, 2024·1 min read