Hi guys, having some trouble with my tic tac toe logic. Anybody have any ideas why this logic isn't giving me true? The current state is meant to represent the first winning case. I'm using the every() method to determine if any of the winning cases are being met by player X (represented by 1)

@sjames1958gm not wanting to interfere while you help others but just a quick question if you find the time. Would it be acceptable to solve the tic-tac-toe challenge with a huge bunch of if else statements /

@sjames1958gm ok. Thanks. The thing is though I've been trying to come up with a better solution for it since last Monday and the game does seem to be a little bit over me. I can't come up with anything better without going online and copying stuff from the internet

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.

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.

functiongetData(){
//ONCE THIS GETS THE DATA IS PRESENT IT SHOULD TRIGGER 2 DIFFERENT FUNCTION ie. dataRecievedProcess1 and dataRecievedProcess2//I KNOW THAT I HAVE TO USE CALL BACKS BUT CAN ANY ONE GIVE ME SYNTAX OR EXAMPLE
}
functiondataRecievedProcess1(){
}
functiondataRecievedProcess2(){
}

i've got a bit of a complicated question. how do i select the specific element i clicked on with an onclick event. the important thing to note is, there are a bunch of possible elements i might click on, but i need to know the value from the specific element i've clicked on. i hope that makes senseexample

//i'm going to get the user to click on one, how do i select the one they've clicked on with jquery?
<p>somedata</p><p>somedata</p><p>somedata</p><p>somedata</p><p>somedata</p>

@Jay33Canada not totally, you can make a query selection for all p elements, add the click event and in the body of the callback you can do console.log(this); check your devTool console you'll see the element clicked

I like the last part: "people will cry at once, laugh is learned later. So sadness is a low-level instinct, and happiness is a more advanced ability. Life is like a cup of tea, not a lifetime, but always bitter for a while. Slowly to the goods, happy life is always behind.A good day from the "taste of happiness" start!"

any ideas on why my dns.lookup isn't good for http(s) anyone? www works fine, just trying to get it to work like the url shortener microservice in beta. coincidentally their example gives an invalid url for www, and only accepts those with the protocol

functionmyLocalScope(){
'use strict';
var myVar = 10;
console.log(myVar);
}
myLocalScope();
// Run and check the console// myVar is not defined outside of myLocalScopeconsole.log(myVar);
// Now remove the console log line to pass the test

@Doug-Luce when i reduce more than 32 from my number (96.74) it does not return correct mathematical answers: http://jsbin.com/vadifiwomu/edit?html,js,output is there a way around it or am i going to have to eliminate the decimal factor?

@rugano loop throught the contacts array checking to see if any of the objects have a firstName that match the firstName parameter, then if a firstName match is made check if that contact has the prop property if it does return that properties value and if not return no susch property

then after the loop if you dont find a frist name match return no such contact

I'm so close! Now I can't read property "snippet". Where is the json2 object from the search's success call? It got far enough to look for the link (which, based on console output, is correct) but I dunno...

hi guys, sorry to barge in. i've been trying to figure this out for an hour now. it is just not clicking... i need to use this function to add ITEM to the end of the array, remove the first element of the array, and then return the element that was removed

@forkerino Yes, I am just starting to get how it works. I am not sold on it completely because it is a big change. The nightlife app is using Redux and React Router too so that is another few things to learn.

@JohnnyBizzel thanks, that is very helpful. Looking at how I very quickly became proficient at JS, it is definitely due to helping beginners here and explaining the concepts to them. I precisely did what he said, i.e. when I noticed a gap in my knowledge, go back to studying and formulating an answer in the language that someone else could understand.

@forkerino You can build it using React/Redux. If you have already learned React it will be easier for you to use it. As @JohnnyBizzel said I made it using Vue, but I am not sure that was the best decision as it took a long long time to finish it.

@a27-suryanshif firstName is an actual contact's firstName this implies that you need an if check of the parameter firstName vs. the propertyand the given property (prop) is a property of that contact. and you should check that prop exists on the contact

@flansolo yeah, I know how to use mLab, and have been using it for my backend projects, but wanted to know more about the inner workings, so started the course. It is great, but this week is a tough week. I think the amount of lecture time is at least 4 times that of the last few weeks. But I'm learning a ton.

@flansolo it looks very much like what I have. I did a .trim on the url before passing it to dns.lookup, but other than that only the body of the callback function is different, cause I returned a boolean.

@a27-suryansh mostly JS, but I've learned a little bit of C, Java, Python and Elixir, because I want to broaden my scope. But JS is a huge topic once you get into Node.js and some of the frameworks. Still learning, every single day.

@a27-suryansh btw, don't get discouraged if you get stuck. This is the hardest part. I get stuck all the time. It is an opportunity to learn more, to dive deeper. Getting stuck is not a sign of being dumb or something, but a sign that you are breaking through a boundary on the way to more knowledge and understanding.

@Aniculaesei I did most of them myself, because I don't like admitting I don't understand something. :) The way I did it was to learn how to debug, read the documentation over at MDN (sometimes multiple times for the same method), use a tool like pythontutor.com to visualize code execution and read everything again and again. Sometimes it is easier to ask for help, but if you do, make sure you understand everything before you move on. It is also good to periodically go back to an exercise you had problems with, reset the code and rewrite everything without asking for help. This will cement the knowledge and make you learn a lot.