Skip to content

Instantly share code, notes, and snippets.

carinlynchin

Block or report user

Report or block carinlynchin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View carineLawson-surefoot-application.md

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.
View flatten.js
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]);
You can’t perform that action at this time.