Tag: bonfire

Free Code Camp Intermediate Scripting: Diff Two Arrays

jackLyons Free Code Camp Tags:
0

This seemingly simple Free Code Camp intermediate algorithm problem requires a bit of deeper thinking and understanding of functions, however it’s all there in the MDN JavaScript documentation. The question asks us to “Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays.

(more…)

Free Code Camp Bonfire: Sum All Numbers in a Range

jackLyons Free Code Camp Tags:
0

Alright, now that I have completed the first round of Front End projects, finally we are back into scripting! In this post I’ll show you how to solve the first intermediate bonfire problem where you need to sum all numbers in a range. For example, if your range is [1 – 5], you’ll need to add 1+2+3+4+5 together.

(more…)

Free Code Camp Bonfire: Falsy Bouncer

jackLyons Free Code Camp Tags:
2

This Free Code Camp bonfire is supppppper simple. Finally, it’s nice to get a break for once and solve a problem with only a single line of code! In this Falsy Bouncer bonfire all we need to do is remove all the falsy values from an array. Falsy values in javascript are false, null, 0, “”, undefined, and NaN.

(more…)

Free Code Camp Bonfire: Mutations

jackLyons Free Code Camp Tags:
0

In this Free Code Camp bonfire you will learn how to find specific words/letters in a string and check back to see if it was in the original string. I’m sure something like this would be quite helpful when sifting through ton’s of data on a page. Here’s how I solved the problem:

(more…)

Sign up to receive up-to-date web tips, tricks and code hacks!