Skip to content

Instantly share code, notes, and snippets.

Exercise 1: Form validation

Hypothesis: Adding form validation to the "name" and "message" fields of the email form will increase form submissions.

Device type: Desktop only

URL: http://surefoot.me/engineer-application-sandbox/

Dev notes:

  • Currently, the form only checks for a valid email.
var a = [[1,2,[3]],4]; // -> [1,2,3,4]
var newA = [];
function flatten(a) {
for (var i=0; i<a.length; i++) {
if (typeof a[i] != 'number') {
newA.concat(flatten(a[i]));
}
else {
newA.push(a[i]);