Interviews
We're crafting GreatFrontEnd with passion, precision and quality.

Our in-browser coding workspace allows you to simulate a real interview environment with no set up required.
Run your code against tests and instantly preview your output
Resize and customize the workspace as you like
Syntax highlighting, theming and shortcuts
1function LikeButton() {
2 return (
3 <div className="button-container">
4 <button
5 className={classNames(
6 'like-button',
7 liked
8 ? 'like-button--liked'
9 : 'like-button--default',
10 )}
11 disabled={isPending}
12 onClick={() => {
13 likeUnlikeAction();
14 }}>
15 {isPending ? <SpinnerIcon /> : <HeartIcon />}
16 {liked ? 'Liked' : 'Like'}
17 </button>
18 {errorMessage && (
19 <div className="error-message">{errorMessage}</div>
20 )}
21 </div>
22 );1
2export default function makeCounter(initialValue = 0) {
3 let count = initialValue - 1;
4
5 return () => {
6 count += 1;
7 return count;
8 };
9}