OpenAI frontend engineer interviews emphasise JavaScript, DOM manipulation, CSS, accessibility, browser APIs, and UI component architecture.
cd command. Given a current directory path and a relative destination path, return the final absolute...Input: Given inputmalloc and free operations with efficient...Input: Linked list"A.B.C.D", where each octet is an...Input: Stringmessages and a number k, write a function that returns the last k messages sent to the chatbot.function getLatestMessages(messages: string[], k: number): string[]getLatestMessages(["Hello", "How can I assist you?", "What is OpenAI?", "I love AI!"], 2)['What is OpenAI?', 'I love AI!']messages array will have at least one message and at most 10^4 messages.k will be a positive integer not exceeding the number of messages.Promise that includes unique features tailored to OpenAI's needs.Promise class complying with the following methods:resolve(value: any): void — resolve the promise with the given value.reject(reason: any): void — reject the promise with the given reason.then(onResolved: Function, onRejected: Function): Promise — register callbacks to receive either a resolved value or a rejection reason, and return a new promise resolving to the return value of the called callback.then calls.Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free