My company is hiring a junior front end dev to do my FE bitch work. I want them to pass a programming test (javascript)...

My company is hiring a junior front end dev to do my FE bitch work. I want them to pass a programming test (javascript). Something that shows me that they won't fuck up anything if I leave them alone but not too hard that it scares away qualified candidates. What are good programming questions to ask on a test?

What I have so far:
1. fizzbuzz
2. reverse a string
3. value of this when it's in a function inside of a function

Attached: 1_wlDyoCe59lR2gJWbrUhQMw.png (600x400, 26K)

Other urls found in this thread:

developer.mozilla.org/en-US/docs/Web/JavaScript
twitter.com/AnonBabble

I don't think there's a convention for this kind of test, fizzbuzz for example is considered a very poor avaliation exercice, but people use it anyway because no one can reach a consensus.

I'd go to freeCodeCamp and grab some tests from there, or Codewars if you think that's too trivial.

Maybe they should give you a retard test first.

Attached: 1530991338510.png (680x521, 94K)

fizzbuzz is a "do you know the mod operator"/"can you read" type of problem
it's funny though, if you make a fizzbuzz thread you'll see many people will fail, for instance missing the range (say, not printing 100), and just make small mistakes

1. Char-fizzbuzz. The program should print "a b Fizz d Buzz Fizz g h Fizz Buzz ..."
2. Reverse a string recursively.
3. What does (x=>x=>x)((x=>x=>x)()(this))() evaluate to and why?

White board

Give them one easy, one harder, one relevant architecture type question.

>Reverse a string
>Find all palindromes in a string
>"Pretend I'm the client and I'd like a web page to contain x, y, z information. Ask me questions and tell me how you'd go about designing it."

The idea with these things is not to have right answers, but compare the applicants and get a sense of who did the best. Think about speed, how much help they needed, attention to detail, process etc.

> front end design
> don't test them on css grid or anything front end

reverse a non-binary tree

Not only just on a test, ask about how they would overcome a problem where they are unsure of anything.
Helpful websites, documentation sources.

For a junior, I never really see a problem with their answers, but it does let you paint a picture on how well they might cope

God fucking damn when will this faggot minimalist vector art style die already? Pic related

Brainlet here.

In the first one, would the 'best' way of achieving this be to index each character of the string and then print the index in reverse?

And would the second involve naturally occurring palindromes or constructed? As in, rearrange characters to find all possible versus whatever is already there.

There is no "best" way.
You could use split, reverse and join to show you know JS. You could write a decrementing for loop to show you know basic programming logic. Both are acceptable.

>avaliation
get out pajeet

use a real laguage (the one that has a switch case statement)

how about practical ones:
1. fizzbuzz
2. sieve all primes below 500
3. take some data from A.xml, parse and process it in a specified way, and store it in B.xml
4. reverse every second sentence in a given paragraph, ex:
test me. test this. test that. = em tset. siht tset. taht tset.
5. write your own grep
6. make a snazzy website UI from some scraps of code i give you.

this should all be doable in 4Hrs max.

>avaliation

OP, just make the dude spell a few words in english. If they can spell words in english, they can read english. If they can read english, they can copy and paste from StackOverflow. And if they can copy and past from StackOverflow they are over qualified for front end web shit development anyway.

I don't have many ideas for you but string reversal is good. Except ask them to implement a .reverse() method for the String type. Shows they know that a prototype is.

Maybe ask a question involving prototypal inheritance. Really anything from the Intermediate and Advanced sections here is a good candidate developer.mozilla.org/en-US/docs/Web/JavaScript

>bitch work
>programming

doesn't one solve the other?

Look at their portfolio, particularly the JavaScript, accessibility and use if modern tooling, html5/css3.
Are they getting a front end developer because you suck or are overworked? If the former delegate this to someone smarter.. really though, fizzbuzz for front end is dumb.

If they can't explain how prototypes work don't hire them

Attached: EntryLevelJobQuestions.png (4592x2292, 1.65M)

Ask them to iterate over the properties in an object.

>3. What does (x=>x=>x)((x=>x=>x)()(this))() evaluate to and why?

It evaluates to whoever wrote that being fired

>all these language-specific assumptions

there isn't a single intelligent suggestion in this entire fucking thread

>Ultra easy #2. 50% of Jow Forums will fail here
you're kidding, aren't you?

Don't give them shitty unrelated programming brain tesears. Ask them what websites they have made and look at the code.

Easy.10 is pretty imprecise. What does it mean to select the furthest away state? The one where the closest cinema is furthest away? The one where the mean distance between it and all other cinemas is the smallest? Some memery with a convex hull?

Do you seriously ask these during interview ? How much would you pay someone that coast through them ?

I would stop halfway through the easy questions because too much effort.