Code Repo to submit technical interview responses for candidates
- Start by forking this repository to your own github account.
- Please select a number of questions from this list to tackle in around an hour.
- Once you have the PR setup feel free to respond to the email thread with a code submission link.
- Feel free to format the responses in their own files in the PR submission
var data = [
{ message: '12313', userId: 0},
{ message: '34212', userId: 1},
{ message: '34234', userId: 2},
{ message: '54532', userId: 3},
{ message: '31233', userId: 4},
{ message: '12312', userId: 5},
{ message: '12313', userId: 6}
];
var dataToFind = '31233';
For each multiple of 3, print "Fizz" instead of the number. For each multiple of 5, print "Buzz" instead of the number. For numbers which are multiples of both 3 and 5, print "FizzBuzz" instead of the number.
Using hooks, write a function that fetches data from fetchUrl
- When the component re-renders, it should not re-fetch the data
const fetchUrl = 'http://httpbin.org/anything';
const Component = (props) => {
return (
<div>
{/* Render the fetched data */}
</div>
);
};
employees projects
+---------------+---------+ +---------------+---------+
| id | int |<----+ +->| id | int |
| first_name | varchar | | | | title | varchar |
| last_name | varchar | | | | start_date | date |
| salary | int | | | | end_date | date |
| department_id | int |--+ | | | budget | int |
+---------------+---------+ | | | +---------------+---------+
| | |
departments | | | employees_projects
+---------------+---------+ | | | +---------------+---------+
| id | int |<-+ | +--| project_id | int |
| name | varchar | +-----| employee_id | int |
+---------------+---------+ +---------------+---------+
- Write a query returning the employee's name, salary and department name
- Write a query that lists the name of each employee and the title of the their project
- Write a query that lists all departments and the number of employees in each one
for (var i = 0; i < 3; i++) {
setTimeout(function() { console.log(i); }, 1000 + i);
}
console.log(0 == false);
console.log(0 == '');
import React, { createContext } from 'react';
const App = () => {
return (
<>
</>
)
}
Using test driven development, write a component that displays the local time from our timestamp service in a H1 tag.
- The component should display the service time in HH:MM:SS
- The component should render a loading state while waiting for data from the service
/**
* GET: Returns the server time in the following format
* { utc: {utcTimestamp}, iso: {isoTimestamp} }
*/
const serviceUrl = 'https://rfwavrgo09.execute-api.us-east-1.amazonaws.com/dev/admin/timestamp';
Assuming this codebase uses Apollo client and useBar
is a hook around a GraphQL query, write a unit test that checks that Foo
renders the error state when useBar
throws an error
import { useBar } from './queries.ts';
...
const Foo = () => {
const [data, { error, loading } = useBar();
return (
<Page>
...
</Page>
);
}