Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
Activity
Eric Phy
@SimplyPhy
depending on the line count, i guess
also, if you tells you there’s an extra }, there probably is an extra } :D
but maybe not; we’ll see
Jonathan Herman
@lantech19446
var userChoice = "null";
var choice = function(choice){
prompt("Do you choose rock, paper or scissors?");
if (choice === "rock") {
userChoice = "rock";
}
else if (choice === "paper") {
userChoice = "paper";
}
else if (choice === "scissors") {
userChoice = "scissors";
}
else {
userChoice = "null";
}
}
choice (userChoice);
if (userChoice === "null") {
function choice()
}
else {
function compare()
}

var computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = "rock";
} else if(computerChoice <= 0.67) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
}
var compare = function (choice1, choice2) {
if (choice1 === choice2) {
return "The result is a tie!";
}
else if (choice1 === "rock") {
if (choice2 === "scissors") {
return "rock wins";
}
else {
return "paper wins";
}
}
else if (choice1 === "paper") {
if (choice2 === "rock") {
return "paper wins";
}
else {
return "scissors wins"
}
}
else if (choice1 === "scissors") {
if (choice2 === "rock") {
return "rock wins";
}
else {
return "scissors wins";
}
}
}
alert (compare(userChoice, computerChoice));
Matt Tarabulski
@bulski7
@Lilyheart where is the meetup on tuesday? would like to come check it out
Lily Romano
@Lilyheart
Tuesday? This chat room.
Matt Tarabulski
@bulski7
oh gotcha
Lily Romano
@Lilyheart
And welcome :fireworks:
Matt Tarabulski
@bulski7
i meant the in person
that is wednesday right?
Lily Romano
@Lilyheart
The next in person is wednesday 1/11. The location should be on meetup. North Wales library
Matt Tarabulski
@bulski7
ok got it I see it now
Scott
@TScottM12
I've been thinking about coming and checking it out as well; just haven't had the chance yet
Lily Romano
@Lilyheart
1/11 is a (hopefully) special (hopefully) big joint meetup with both MontCode and Buxmont Openhacks. Thus the different library.
Matt Tarabulski
@bulski7
ok great, sounds fun
Lily Romano
@Lilyheart
That reminds me…

@/all For those not on meetup’s MontCode email list, this message went out yesterday: Hello fellow MontCoders! 2016 has been an interesting year for the group! The group officially kicked off May 17th. Since then, we have has 31 weekly online chats, 13 meetups, and 2 lectures! We've posted nearly 14,000 messages in the chat room!

I am looking for ways to make 2017 even better than 2016. But, to do this I need to know what you want! I’ve created a survey to gather this information. If you could please just take a few minutes of your time it would be greatly appreciated. None of the fields are required and you can skip any fields you wish. However! If you complete every field (but the last one, you'll see it) your name will be entered into a hat. On the January 11th meetup, I will pull for a prize basket! I am still gathering more prizes but at this time we have stickers, an Arduino pro mini, and a gift card!

Mike
@dcpking
@lantech19446 Jonathan, To avoid mismatches like you were running into, try religiously using the parens everywhere ! So "if () { <statements>} else {<statements>} at all times.
Matt Tarabulski
@bulski7
i filled out the survey
looking forward to meeting people
Lily Romano
@Lilyheart
Thanks! :thumbsup: :thumbsup: :thumbsup:
Jonathan Herman
@lantech19446
@dcpking i have no idea what you're talking about i haven't figured out the issue yet and as far as i can see all my if paramatere are in () are you seeing something I'm not?
Lily Romano
@Lilyheart
How is everyone's holiday? I'm making an arduino kit for the survey prize which is fun because I really have no idea how thing work :laughing: my roommate will (hopefully) fix anything I get wrong xD
Lily Romano
@Lilyheart
@dcpking what do you think? A little kit with an LED that can be programmed to blink to get 'em excited to program with hardware? [for the survey prize bucket]
Mike
@dcpking
Sounds neat, @Lilyheart ! Can you include a microphone, so it blinks more often as the ambient noise increases ? (Sort of a "calm down!!" machine :) )
@lantech19446 If you're still here, send me your email and I'll show you how I might have laid out your code ...
Lily Romano
@Lilyheart
If they wanna go out and buy one, more power to ‘em xD
Mike
@dcpking
A mic? I'll spot you the cost of one from RadioShack if you like
Lily Romano
@Lilyheart
I’m not sure what all you’d need to hook it into the stuff. It’s this board. Going to see if C will solder some pins on. right now i have my tester mini plugged into a breadboard with a resister and an LED xD
powered off the ftdi board that is used to program it cuz i’m lazy
Mike
@dcpking
I've never seen c solder anything. Do you mean c++ ? :)
Lily Romano
@Lilyheart
c = my roommate xD
Mike
@dcpking
I guessed you were invoking some sort of a library :)
Lily Romano
@Lilyheart
xD does radio shack do small programming boards like microcenter?
adafruit has this nice one that would work but i don’t see anything like it at the shack https://www.adafruit.com/products/1063
but there is a microcenter giftcard in the box so whomever gets can get one
Mike
@dcpking
That one at AdaFruit does look nice. The gift card will let them do it ... hang it out there as enticement! (sorry - got carried away reading about I2C communications chips!
Lily Romano
@Lilyheart
lol
Mike
@dcpking
gotta go cook - sorry. TTFN
Lily Romano
@Lilyheart
Free Code camp live stream tonight https://www.freecodecamp.com/open2017/
Mike
@dcpking
Hey! I didn't know - it seems like it's already started over in England!
Jonathan Herman
@lantech19446
@dcpking sorry keep falling asleep there's only one part i had a choice in. And it worked until i added function choice
Lily Romano
@Lilyheart
Dunno if this link will work. What I put together for the box and tested by writing a quick blink program. Not the Arduino that will be given away tho. That's my tester for when I ever get some to making those sensors. https://goo.gl/photos/KKxxFnEjcEjxTWyT9
Lily Romano
@Lilyheart
Aniruddha Das
Hi Everyone and happy new year
gpsims
@gpsims
Hello
Michael Perry