Tip 1: Concentrate on JavaScript proficiency and solve DSA problems using JavaScript.
Tip 2: You should possess a strong grasp of asynchronous JavaScript.
Tip 3: Practice solving machine coding problems using React and Vanilla JS.
Tip 1: Prioritize showcasing your most impactful projects, especially those recognized by your previous organization.
Tip 2: Quantify the improvements and impact of your projects with specific statistics and metrics to effectively demonstrate your value.
Create your own version of Function.prototype.bind without using the built-in bind method. To ensure you don't overwrite the existing Function.prototype.bind, name your implementation Function.prototype.myBind.
Example
const john = {
age: 42,
getAge: function () {
return this.age;
},
};
const unboundGetAge = john.getAge;
console.log(unboundGetAge()); // undefined
const boundGetAge = john.getAge.myBind(john);
console.log(boundGetAge()); // 42
Create your own version of Function.prototype.call without using the built-in call method. To prevent overwriting the existing Function.prototype.call, name your implementation Function.prototype.myCall.
Example
function multiplyAge(multiplier = 1) {
return this.age * multiplier;
}
const mary = {
age: 21,
};
const john = {
age: 42,
};
multiplyAge.myCall(mary); // 21
multiplyAge.myCall(john, 2); // 84
In browsers, you can locate specific words or phrases on a webpage by using Ctrl + F (Windows, Linux) or ⌘ + F (Mac) and typing in the search term. The matches are then highlighted in yellow.
Now, let's create a simplified version of this in-page search functionality. Given a content string and a query string, we need to implement a function called textSearch. This function should find all case-insensitive occurrences of the query string in the content and wrap each match in ... tags to make them bold.
Examples:;
1.
textSearch('The Quick Brown Fox Jumps Over The Lazy Dog', 'fox');
// 'The Quick Brown Fox Jumps Over The Lazy Dog'
textSearch('The hardworking Dog overtakes the lazy dog', 'dog');
// 'The hardworking Dog overtakes the lazy dog'
2.
textSearch('aaa', 'aa');
// 'aaa'
// This is because the second character cannot be used as a match again
3.
textSearch('aaaa', 'aa');
// Correct: 'aaaa'
// Wrong: 'aaaa'
Design a chat application that allows users to send messages to each other.
The problem is then divided into several detailed discussions.
1. What are the core functionalities needed?
- Sending a message to a user.
- Receiving messages from a user.
- See one's chat history with a user.
2. Is the message receiving in real time?
Yes, users should receive messages in real time, as fast as possible without having to refresh the page.
3. What kind of message formats should be supported?
Let's support formats text which can contain emojis. We can discuss supporting images if there's time.
4. Does the application need to work offline?
Yes, where possible. Outgoing messages should be stored and sent out when the application goes online and users should still be allowed to browse messages even if they are offline.
5. Are there group conversations?
We can assume it's a 1:1 messaging service.
6. Advanced Discussions happened later on.
- Searching (Use a hybrid of both online and offline search)
- i18n
- End-to-end encryption
- Delivery/read receipts
- Offline/optimistic reads
- Reactions
- Typing indicator
- Disappearing messages
- Notifications

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL clause is used to specify the conditions in a query?