DFO Front-End Practical Test

1) Assume you have a User Registration form with below fields:

  • User Name : required
  • Password : required, min length is 6 and max length is 8
  • Confirm Password : required and matches password field
  • Email : required and email format
  • Birthday: optional and date type with format (mm/dd/yyyy)


- Requirement:

 + Please use AJAX to submit this for, which must be validated on client side before submitting to server. If there is any invalid field, alert an error message to user and focus to that field.

 + If server responds that user already exists, please alert to user.

** Note: Don't use HTML5 form validation, that mean you must manually validate it. Using native javascript is a plus.


2) Please make a sample code about Javascript closure and explain it.



3) Please create an expand/collapse FAQ accordion as the following picture:





- Requirement: At a time only display an answer, with animation effect when expand/collapse the answer block.

** Note: Using native javascript is a plus.



4) Below design images are provided, include desktop, tablet, and mobile:












- Requirement: Please build a web page in a single responsive HTML structure as the design.

** Note: Using pure HTML5/CSS3 is a plus. Mobile first approach is a plus.


Test is within 1 hour, without Internet access. Candidate can use this library if needed: jquery-3.3.1.min.js