Montana-Media-Arts / 441-WebTech

Resource Repository for MART 441 - Web Technologies
https://montana-media-arts.github.io/web-tech/
MIT License
13 stars 2 forks source link

HW4 Problem 3 "Letter Counting" #12

Open EllenMorningstarUM opened 6 years ago

EllenMorningstarUM commented 6 years ago

I'm just about the throw in the towel for Problem 3 and take the hit on my grade.

I don't understand how we can make the functions work when the functions all have the same name as the return. Example

I can't make this work:

function countChar(string) { return countChar(string, "B"); }

Am I missing something or did someone else find a solution?

fbrown222 commented 6 years ago

I really hear you. The first two of this homework I understood somewhat (mostly I think I got lucky writing down different things), but the rest of it, I'm completely running into walls.

The only way I could get #3 to work was by using a function that wasn't ever mentioned in the reading material called charAt(). Hope that helps

Yeah, and #4, I'm basically taking the hit for. I can't get it for the life of me. I've spent hours, and really nothing to prove for it. Haven't even gotten to #5 yet...I'm just barely starting to read chapter 5. Theres just sooooo much material this week, I'm kind of dying trying to absorb it all.

JakeTheFlare commented 6 years ago

Here's what I wrote in the function section: function countChar(string, letter) Hope this helps.

ellenkuehl commented 6 years ago

Ellen,

it looks like you didn't add a second argument in the function like JakeTheFlare did. Give that a try and let me know if it works. :) Also, I am Ellen! Twins!