Skip links

Main navigation

Steamroller

The Challenge: [crayon-57702503cf70f103318942/] The solution should return: [crayon-57702503cf71e566647724/] Some helpful links: Array.isArray() Javascript Basics Part 12(recursion) JavaScript Function Invocation Starter Code: [crayon-57702503cf727421908031/] One thing that got drummed in me from doing so many algorithms was that if I was using an Accessor Method, I had to make sure to declare a variable that was assigned a new array, as in the solution to this algorithm with var ... Continue Reading

Finders Keepers

The Challenge: [crayon-57702503d044c394956302/] The solution should return: [crayon-57702503d0457325338961/] Some helpful links: Array.prototype.filter() Here I immediately noticed that had to take into consideration only two outcomes, and both involved the same condition: [crayon-57702503d045e172839709/] The two parameters passed as arguments to function findElement() were an array and a function. So how was I to approach it? Since I was dealing with an array with a set number of ... Continue Reading

Convert HTML Entities

The Challenge: [crayon-57702503d0936006420393/] The Solution should return: [crayon-57702503d0940994030803/] Some helpful links: Regexp HTML Entities String.prototype.replace() Starter Code: [crayon-57702503d0948830404803/] The solution to this algorithm is pretty straightforward. I simply used the .replace() method on the str parameter passed as an argument to the convertHTML() function. I used .replace() on each character to convert it to an HTML ... Continue Reading

Boo who

The Challenge: [crayon-57702503d0ec6181881138/] Solution should return: [crayon-57702503d0ed0831262925/] Some helpful links: Boolean Objects The Difference Between Boolean Objects and Boolean Primitives in JS Boolean Primitive: Definition: Boolean primitives are true and false. In most code, the primitive values are used, like so: [crayon-57702503d0ed8639898438/] Primitives are values. They have no properties. In JavaScript there are 6 primitive types: (primitive value, primitive ... Continue Reading

Symmetric Difference

The Challenge: [crayon-57702503d16c4268308358/] Solution should return: [crayon-57702503d16cf880162400/] Some helpful links: Array.prototype.reduce() Symmetric Difference Provided Starter Code: [crayon-57702503d16da074895734/] Symmetric Difference: Definition: the symmetric difference of two sets A and B is the set of elements either in A or in B but not in both. I had to think hard about this one. I had already dealt with symmetric difference in another challenge (Diff Two Arrays), ... Continue Reading

Validate US Telephone Numbers

The Challenge: [crayon-57702503d225c431907815/] Solution should return: [crayon-57702503d2267857026773/] Some helpful links: Regexp Provided Starter Code: [crayon-57702503d2270790336236/] My first attempt: [crayon-57702503d2276769678848/] Expected Solutions which were not actual: [crayon-57702503d227c910101583/] My second attempt: [crayon-57702503d2282059164229/] Expected Solutions which were not actual: [crayon-57702503d2288437088642/] There was a slight improvement from the ... Continue Reading

Babel, Lebab, or JSHint: which one is right for you?

I say all three, and I will explain why. Lately I have been agonizing over how to learn ES6, and then I was introduced to Babel. What is Babel? Babel is a generic multi-purpose compiler for JavaScript. According to the Babel Handbook, Using Babel you can use (and create) the next generation of JavaScript, as well as the next generation of JavaScript tooling. JavaScript as a language is constantly evolving, with new specs and proposals coming out with new features all the time. Using Babel ... Continue Reading

Front End Development Resources contd

Since I am going to host my first weekly Coffee and Code for fellow Free Code Campers, I decided to compile some great Front End resources I have accumulated/learned about along my developer journey. I will be posting it on the Free Code Camp forum as well. I will continue to add more resources as I come across (or remember) them. For starters I recommend: Articles: Read my previous article "Great Front End Development Resources to Glean From" Here are the five must read books if you are a ... Continue Reading

Roman Numeral Converter

Challenge: [crayon-57702503d301a457247050/] Some Helpful Links: Roman Numerals Array.splice() Array.indexOf() Array.join() Solution should return: [crayon-57702503d3027552599973/] Upon examining the challenge for a little while, I decided that I would need to 1. create 3 arrays; 2. use a conditional statement; 3. make sure that the roman numeral returned was uppercase. Then I checked out the Roman Numeral Converter to get a better handle on what I had to do. First I had to refresh my ... Continue Reading

Diff Two Arrays

Challenge: [crayon-57702503d377f632241463/] Solution should return: [crayon-57702503d3789824419666/] Helpful links: Comparison Operators  Array.slice() Array.filter() Array.indexOf() Array.concat() After reviewing the link posts, I knew that I would need to use Array.indexOf() and conditional statements. arr.indexOf() method: returns the first index at which a given element can be found in the array, or -1 if it is not ... Continue Reading