Hi everybody. I'm just on the Caesars Cipher challenge, and while my solution works in Sublime, for example, it's not getting past the challenge's tests, and I'm not sure why (even after reading a few github issues as regards the challenge). I don't suppose anyone with fresh eyes might be able to spot where I've gone wrong? (And bear with me if this isn't the most elegant solution.)

I'm indebted for this, @sjames1958gm I was suspecting there might be some redundancy in what I had going on (but, frankly, I was just overjoyed I got the thing to work - and, indeed, with your help, it just passed the tests). I'm going to copy what you've written and go study over it.

@intcreate Counting Cards is a challenge where your function will receive a card parameter. You're supposed to increment or decrement the global count variable according to the card's valueIf the value of the card parameter is 2, 3, 4, 5 or 6 you need to increment the global variable count.If the value of the card parameter is 10, 'J', 'Q', 'K' or 'A' you need to decrement the global variable count....Then the function will return a string with the current count and the string "Bet" if the count is positive, or "Hold" if the count is zero or negative.The current count and the player's decision ("Bet" or "Hold") should be separated by a single space.......Things to note: You should NOT be returning based on the value of the card. The value of card should only be adding or subtracting 1 from the global variable count.The value of the global variable count is used to determine the return statement.

How to write an if conditional statements with OR and AND operators:I am seeing a large number of people writing if conditions using OR and AND operators incorrectly.Here is an example of what I'm seeing:

hey guys&gals, I need help with the Counting Cards problem. I know I can probably find the answer somewhere on the forums but I actually want to learn why I am doing this wrong if someone can point me in the right direction that would be great.

@xwmaxx Counting Cards is a challenge where your function will receive a card parameter. You're supposed to increment or decrement the global count variable according to the card's valueIf the value of the card parameter is 2, 3, 4, 5 or 6 you need to increment the global variable count.If the value of the card parameter is 10, 'J', 'Q', 'K' or 'A' you need to decrement the global variable count....Then the function will return a string with the current count and the string "Bet" if the count is positive, or "Hold" if the count is zero or negative.The current count and the player's decision ("Bet" or "Hold") should be separated by a single space.......Things to note: You should NOT be returning based on the value of the card. The value of card should only be adding or subtracting 1 from the global variable count.The value of the global variable count is used to determine the return statement.

@iamryandnelson You have code that parses the channels endpoint, but you're calling the streams endpoint. Do a console.log(data1) as the first line of your success function and you'll see what data is coming back.

keep in mind, different users may have different data on each endpoint,s so a logo may not exist for everyone

@EverythingEpi I'll tell you this. Last year, I stopped FCC when I got to the JS section. Recently, I started Harvard's CS50's course and they get your feet wet with a programming language called C, which is supposed to be the like the mother language of most programs. JS is really similar to C, so after watching a couple of their lectures, JS looks a tad simpler (not SIMPLE SIMPLE, but easier to read prior to me not watching those lectures!)

@GitHub-Henry Not many folks can say that either. The place I worked at the time fired their zOS guy cause he was always really mean to the help desk people, I would crack up in my office when he was yelling into his phone at some poor helpdesk guy trying to reset a printer queue.

All that mainframe stuff was super archaic, to my eyes. Sorry guys, I can ping it, the network isn't causing your issue.

What is your opinion on concurrently learning C and JavaScript? I'm back on FCC since this C assignment is really difficult for me at the moment, but meanwhile, from the little I've learned of C, I'm doing pretty alright so far in these JS lessons. I'm hoping that what I pick up in JS will make me go, "OH!" for something I'm having trouble with in C, and vice versa

@iamjoshuacolon Okay, first, do you understand that in computer logic, "0" is the starting number? e.g. in this sequence: 1 2 3, the number 1 is considered "0" (the first value in that series)Second, look how many brackets you have with numbers. [1, 2, 3] [4, 5, 6] [7, 8, 9]. Can you tell me, if you just number the bracket boxes, what bracket box is number 8 in?

this is a lil off course on the fibonacci challenge, but iwas wondering. I figured out how to create the fibonaci algorithm, but i want to create an algorithm that will print out the next number on click not like a loop that prints out all the numbers at once, so im havin trouble coming up with a way that the number would get saved, would i have the interperter look at DOM after every click to see the number printed and use that number?

@Pagnito if you just want the next number, bind click to a function and store N and N-1 variables. Update the variables everytime you run the function with the new value as N and the previous value as N-1

@Pagnito yeah, pretty much. the functions should (usually) inherit the scope of the parent. that said, if you declare another var savedNumber inside the function, only that local one will be available...

@cmccormack im not sure how i wouldve gone about it for this yet, but basically, when i was using ajax, and doing responve design, i needed to reassign ids for screen resize, and i wrapped the click bind in a function that i calledon resize

playerNumber should be a numberThe variable player should be a stringThe value of player should be "Montana"You should use bracket notation to access testObjYou should be using the variable playerNumber in your bracket notation

@cmccormack LOL! Okay, you're going to laugh. I was using Notepad to write the initial draft of my code and when I copy/pasted it into CodePen the single quote marks written in Notepad were unrecognizable. Thanks for your help :)!

playerNumber should be a numberThe variable player should be a stringThe value of player should be "Montana"You should use bracket notation to access testObjYou should be using the variable playerNumber in your bracket notation

@erolaliyev - you have something there that is on the right track - contacts[i] is definitely the way to access the objects, because they are in an array, and you are generating an index for the array. So that's a good start. The formatting of your code makes it hard to read, though.

so I have been stuck on the sumPrimes algo for quite a while now. I started off kind of knowing what I was trying to do and then ended up mucking with the code until it worked. my inner function is aptly named…can anyone explain this..?

@sarahcharroufBasically, our variable fahrenheit needs to be defined to perform that operation. var = fahrenheit essentially sets it so JavaScript knows that you have a variable. That func of convertToF(celsius) is where it sets up the bottom part of the code where you see convertToF(75). So what you wrote, told the code to do this: fahrenheit = (75 * 9/5) + 32

prop is a variable - you can use it with dot notation, but you have to use bracket notation - contacts[i].prop is incorrect. contacts[i][prop] is what you need. Note that the reason .firstName is okay to access the property in the object is because "firstName" is an actual property name in the object, dot notation works there.

One more thing I thought of (adding this afterward) - you should use .hasOwnProperty() to check that the object has the property you are looking for, that will condition the return of the property or "No such property"

The return for No such contact is something that gets so many people confused. Within the loop, you have to make sure to look at all contacts for matching the firstName - if you do a return from within the loop, the function is ended. So if the first contact in the list does not match, you will return and never look at any others. Move that return "No such contact"; after the loop.

Those should be helpful hints, and I'm sure that someone will help you along with other problems.

@Diesirae9 there are two ways to access or modify objects using properties - the [ ] bracket notation and the . dot notation. Bracket is used when you don't have the explicit property name (example - bravo) but you do have a variable that has the value of that property name (example - var b = 'bravo'; return lookup[b];). Dot notation is used when you can reference the property using the actual name (example return lookup.alpha;).

@cmccormack Well, it gives a function, with parameters, function destroyer(arr). Then below it calls the function with this:destoyer([1,2,3,1,2,3],2,3);So what it wants is for the numbers outside of the array to be removed from the inside of the array and for the only numbers to be returned are those out of the array. So I am having trouble figuring out how to get these numbers when there is just one parameter for both the array and the numbers on the outside of the array

@austinwigginsarguments is a built-in Javascript object, similar to a simple array, that stores all arguments sent to a function. So even if your function only has a single parameter, like arr or whatever, the arguments object may have additional arguments in it, which you can interate over to see

The Bet and Hold actions are dependent on the resultant card count. They should not be in the switch. Try writing another ifelse in the function that checks if total count is >0 or <=0. Then the entire function should return count + " " + betOrHold;

OK, so I am having trouble with the 'Seek and Destroy' JS challenge. I now know of the arguments object, but how to incorporate this into a function I do not know. Any help would be very much appreciated

@9aveen.shift() removes the first element in the array and returns the element removed. .slice() creates a new array out of the elements starting at the given start and end indices and returns a reference to the new array.

@Benji-Leboe well the example would give away the code. But I can tell you the loop only has to run halfway through the array. And then you just have to figure out the indices of the two elements you have to swap. The 1st index will just be i, and the 2nd index will involve i and the length of the array.

@intcreate you should write your loop below where it says, // Only change code below this line.

@anderson2825 inside arrfilter function you should be checking if val matches any elements in values. If it does then you should return false, otherwise return true. you can use a loop, .indexOf() or .includes().Also you have a typo, arr.fliter(arrfilter);