Vowels

This week, we have a pretty easy problem. We are asked to write a function that returns the number of vowels used in a string. Vowels are a,e,i,o and u.

That’s it, that’s all we have to do.

Okay so here we go, we start with our empty function…

Pyramids

Alright, so last week I said to pay attention because the next post was related so if you haven't read the previous post go ahead and do that now by clicking HERE.

Done that? Great! lets upgrade from steps to pyramids. As you can guess this will look familiar to the steps problem and if you want to just try do this problem after looking at the steps post go for it.

Here is our problem,

We are asked to write a function that accepts a positive number N. The function should console log a pyramid shape with N…

Steps

Okay so this problem is a good one and my next post after this is very closely related to this.

Let's start with some directions.

We are asked to write a function that accepts a positive number N. The function should console log a step shape with N levels using the # character. We are also asked to make sure the step has spaces on the right hand side.

e.g.

`steps(2)`

'# '

'##'

steps(3)

'# '

'## '

'###'

and so on. Notice the empty spaces, this is important to remember.

Once again we start with our function…

Capitalize…

O.k. so this is going to be a shorter problem than the last few but I will once again go into as much detail as possible in the hopes it will help you understand better.

For this problem we’re asked to write a function that accepts a string. The function should capitalize the first letter of each word in the string then return the capitalized string.

E.G. capitalize(‘a short story’) → ‘A Short Story’

Before we start working on this problem let's look at a little tip.

First, let's look at the ** .slice()** method. Slice is used on a…

Anagrams

Okay so in this problem we’re asked to check and see if two provided strings are anagrams of each other. One string is an anagram of another if it uses the same characters in the same quantity. We’re also asked to only consider the characters, not spaces or punctuation and to consider capital letters to be the same as lower case.

E.g. anagrams(‘rail safety’, ‘fairy tales’) → True || anagrams(‘RAIL SAFETY’, ‘fairy tales’) → TRUE

Okay, so this week I’m gonna take a break from the technical to just vent a little and maybe give advise, I don’t know yet, lets just see how this goes…

I graduated from Flatiron school in November, it was an amazing experience and I loved almost every minute of it. We are now getting well into March and still no job or even a hint of one. This has me very down and worried about my future this week. …

First off, if you haven’t read my other parts on Algorithms click ** here** to get started.

Okay, what is array chunking? Array chunking is a technique used to split very large arrays into smaller groups, usually for easier manipulation and presentation. With that understanding let’s get started.

Array Chunking

We are given an array and chunk size, asked to divide the array into many subarrays where each subarray is of length, size.

e.g. chunk([1,2,3,4], 2) → [[1,2], [3,4]]

the initial array is split into two subarrays within the chunk.

e.g. chunk([1,2,3,4,5], 2 → [[1,2], [3,4], [5]]

the initial array is…

Well this is a fun one and probably the most popular problem and if you’re here before reading parts I — III you can start *here**.*

fizzbuzz

So for this problem you’re asked to write a program that console logs the numbers from 1 to n. But for multiples of 3 print “fizz” instead of the number and for multiples of 5 print “buzz”. For numbers which are multiples of both 3 and 5 print “fizzbuzz”.

example: fizzbuzz(5) outputs 1 2 fizz 4 buzz.

Okay let's get started…

So for this problem we need to determine a multiple of a…

In this part I will be discussing a technique that is applicable to many other string related questions. Once again if you’re here before reading part II jump over HERE and give that and part I a read if you haven't seen those yet.

Okay so let's get into it…

MaxChar

For this problem you are given a string and asked to return the character that is ** most commonly** used in the string.

e.g. maxChar(“adcccd”) === “c” || maxChar(“apple 11123”) === “1”

So once again we will start with an empty function…

`function maxChar(str) {}`

Now we will declare a…

Okay, so if you’re here before reading part one head on over HERE and give that a read before continuing on, I’ll wait…

Learning to code, one day at a time.