Posts Tagged ‘FCC’

FCC: Boo Who (JavaScript Intermediate Algorithm)

In FCC challenge Boo Who we’re trying to determine values being passed into the booWho function is a boolean. function booWho(bool) { // What is the new fad diet for ghost developers? The Boolean. return bool; } booWho(null); To determine whether the value in a variable is boolean or another type we can use the…

Read More

FCC: Missing Letters (JavaScript Intermediate Algorithm)

In FCC challenge Missing Letters we’re tasked with finding the missing letter in a string of sorted alphabets: function fearNotLetter(str) { return str; } fearNotLetter("abce"); First we need to convert the string of alphabets to their UTF-16 unicode equivalent using the charCodeAt function. Then store the unicode in an array for comparison. for (let x…

Read More

FCC: DNA Pairing (JavaScript Intermediate Algorithm)

In FCC challenge DNA Pairing we’re generating pairing of DNA and then inserting it into a multidimensional array. function pairElement(str) { return str; } pairElement("GCG"); We first need to split the str string into an array. Putting each letter in the array allows us to use the forEach function for each element of the array.…

Read More

FCC: Pig Latin (JavaScript Intermediate Algorithm)

In Free Code Camp’s Pig Latin Challenge we need to convert English dictionary words to pig latin using the following rules: Move the first set of consonants up to the first vowel to the end of the word Then add “ay” as the suffix If the first letter of the word is a vowel, then…

Read More

FCC Challenge 36: Give a Background Color to a Div Element

In Free Code Camp Challenge 36 we learn to set a background color to a div element. You can set an element’s background color with the background-color property. For example, if you wanted an element’s background color to be green, you’d put this within your style element: .green-background { background-color: green; } Create a class…

Read More

FCC Challenge 35: Nest Many Elements within a Single Div Element

In Free Code Camp Challenge 35 we learn to nest elements within div elements. The div element, also known as a division element, is a general purpose container for other elements. The div element is probably the most commonly used HTML element of all. It’s useful for passing the CSS of its own class declarations…

Read More