3rd
Feb 2016
Mohamud Gedi
@Mogedi
Feb 03 2016 00:05 UTC
@mutantspore good idea
CompGeekGirl
@LisaRamos
Feb 03 2016 00:06 UTC
Okay, so I'm having difficulty adding, subtracting, multiplying, and dividing numbers, making them into a total on my calculator and I really need help with my code. Is there a better way to do those things compared to what I have here? http://codepen.io/lisaramos/pen/MKBmgm
Sujit Karki
@Swoozeki
Feb 03 2016 00:07 UTC
@LisaRamos I was having massive trouble into that, until I came across math.js
Pawan
@pawan92
Feb 03 2016 00:08 UTC
@LisaRamos check mine out it might be easier to understand and i dont use jquery that much http://codepen.io/pawan92/pen/XXzQro
Sujit Karki
@Swoozeki
Feb 03 2016 00:10 UTC
@pawan92 Good stuff! I tried doing it without jQuery, but had a daytime nightmare wit that
Pawan
@pawan92
Feb 03 2016 00:11 UTC
im still not sure about jquery so im sticking to using it as little as possible. gonna start doing the clock and plan to implement it the same as my calculator @Swoozeki
Sujit Karki
@Swoozeki
Feb 03 2016 00:11 UTC
@pawan92 by the way, the % sign doesn't mean percent. It's a modulo operation
with jQuery and math.js, it's crazy how much shorter it becomes
but I'd like to eventually get around to doing it with only js, as that'll teach me better
CompGeekGirl
@LisaRamos
Feb 03 2016 00:17 UTC

I'm trying to figure out what to do with this code here as to why my calculator doesn't seem to calculate (and total) anything.

var operators = ["/", "*", "-", "+"];

for (var i = 0; i < operators.length; i++) {
$('.division').onclick(); } Can anyone help me out if they've done this project before? Pawan @pawan92 Feb 03 2016 00:19 UTC @Swoozeki ya i know. but yea if you got any good resources on implementing jquery with html for some of these ziplines that would be great Sujit Karki @Swoozeki Feb 03 2016 00:22 UTC @pawan92 there's a jQuery course over at CourseCademy @LisaRamos your$('.division').onclick(); line makes no sense
CompGeekGirl
@LisaRamos
Feb 03 2016 00:24 UTC

@Swoozeki I changed it to this instead.

var operators = ["/", "*", "-", "+"];

for (var i = 0; i < operators.length; i++) {
$('.op').onclick(); } Now how do I change this again? Sujit Karki @Swoozeki Feb 03 2016 00:24 UTC perhaps you're thinking of .click() method Pawan @pawan92 Feb 03 2016 00:25 UTC @Swoozeki you mean codeacedemy? Sujit Karki @Swoozeki Feb 03 2016 00:25 UTC yes no it's actually codecademy CompGeekGirl @LisaRamos Feb 03 2016 00:27 UTC @Swoozeki Someone told me to use the .onclick(); method. I guess it didn't work out. Now here's what I did. var operators = ["/", "*", "-", "+"]; var decimalAdded = false; for (var i = 0; i < operators.length; i++) {$('.op').click(operators);
}
Sujit Karki
@Swoozeki
Feb 03 2016 00:28 UTC
could you describe what exactly you want to do here?
your code does not make sense at all at this moment
CompGeekGirl
@LisaRamos
Feb 03 2016 00:29 UTC
@Swoozeki What I've been trying to do is calculate the numbers and I'm having difficulty.
Sujit Karki
@Swoozeki
Feb 03 2016 00:29 UTC
no, I mean, in that code specifically
CompGeekGirl
@LisaRamos
Feb 03 2016 00:30 UTC
@Swoozeki I'm trying to calculate numbers in the code using operators.
Sujit Karki
@Swoozeki
Feb 03 2016 00:31 UTC
I understand. One thing to note is that the click() method is executed any time you click on the selected class
so, the for loop is redundant and unnecessary
next, the click() method requires a function inside it, so that the function executes when a selected class is selected
so, if you were to say, write this code:
$(".button").click(function(){ document.write("You just clicked a button"); }); What this code does is, upon clicking the anything with the class button, the text "You just clicked a button" appears *upon click anything with class "button" *clicking sigh... That's how you use .click() method. This method is executed anytime the selected element/class/id is clicked CompGeekGirl @LisaRamos Feb 03 2016 00:44 UTC @Swoozeki But the document.write(); didn't work with my calculator. I tried dividing a number and it went to a different page. I'm trying to figure something out in which I can write a code using all operators instead of one each to make it simple. $('.op').click(function() {
document.write('/');
});

I was thinking of the math objects as mentioned in w3schools.com, for example but it didn't work.

Sujit Karki
@Swoozeki
Feb 03 2016 00:45 UTC
I know, I was giving an example. document.write(); is a function that replaces the whole document with text inside the write() method
replace that with whatever you want to happen when .op is clicked
If you want my advice, ditch this long and boring method for now. why don't you just store everything user clicks into a string?
Sujit Karki
@Swoozeki
Feb 03 2016 00:50 UTC
the use math.js to compute the string
*then
CompGeekGirl
@LisaRamos
Feb 03 2016 00:52 UTC
@Swoozeki How do I store everything a user clicks into a string?
Sujit Karki
@Swoozeki
Feb 03 2016 00:53 UTC
make a empty variable
for example: var block="";
then when a user clicks a button, put the button contents into block. For example:
var block="";
$(".button").click(function(){) var block="";$(".button").click(function(){
block+=this.innerHTML;
});
if you don't understand something from that block of code, ask me
CompGeekGirl
@LisaRamos
Feb 03 2016 01:02 UTC
@Swoozeki Instead I don't have a button class so I decided to use the button tag instead. http://codepen.io/lisaramos/pen/MKBmgm
Sujit Karki
@Swoozeki
Feb 03 2016 01:04 UTC
right, you're on the right path. Now, why don't you display the "block" in the screen next?
$('#inputSec').text(block); inside of the click() function and next, instead of selecting every button, select only the operation buttons and the number buttons. try it So, what happens is only the operation and number buttons text will go into the block instead of every single button CompGeekGirl @LisaRamos Feb 03 2016 01:09 UTC @Swoozeki How do I hide the operation (and modulo) buttons on the screen? I'm trying to make it like my calculator app on my computer. I also want to prevent the clear (and equal sign) from showing up as well. Sujit Karki @Swoozeki Feb 03 2016 01:10 UTC if you want only one number at a time, and for no operations to be shown in the screen, you shouldn't display the whole "block" text on screen then$(".button").click(function(){
if(this.id!=="number-button"){
//display this.id.innerHTML;
}
});
$(".button").click(function(){ if(this.id==="number-button"){ //display this.id.innerHTML; } }); $(".button").click(function(){
if(this.id==="number-button"){
$('#inputSec').text(this.id.innerHTML); } }); in your case... keep the block text and the display(on the screen) text seperate then CompGeekGirl @LisaRamos Feb 03 2016 01:20 UTC @Swoozeki What I have is a class for my number button. $('button').click(function() {
if (this.class === "numBut") {
//display this.id.innerHTML;
$('#inputSec').text(this.class.innerHTML); } }); Dan Stockham @DanStockham Feb 03 2016 01:32 UTC Booya how you all doing? bah I'm drunk Alex Evans @alex-evans Feb 03 2016 01:57 UTC Sorry late on this but thanks @jondcoleman I'll take a look at absolute positioning for the simon game. CamperBot @camperbot Feb 03 2016 01:57 UTC alcatrats sends brownie points to @jondcoleman :sparkles: :thumbsup: :sparkles: :star: 486 | @jondcoleman | http://www.freecodecamp.com/jondcoleman Jonathan Coleman @jondcoleman Feb 03 2016 02:03 UTC @alcatrats it's a PITA so good luck Kevin Elser @CoffeeCodeKevin Feb 03 2016 02:21 UTC Is there anyone here who could help me figure out what's wrong with my codepen? Actually, I know it's this code in particular: function getdesc() { for (j=0; j<10;j++) { var title2=($("#title"+(j+1)).html())
$.getJSON("https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exsentences=1&formatversion=2&explaintext=&titles="+title2+"&callback=?",function(ex) {$("#description"+(j+1)).text(ex["query"]["pages"][0]["extract"]);
});
}
}
Whereas title2 is returning the correct values of the title of what I'm adding a description to if I console.log(title2)
And when I console.log(ex["query"]"pages"["extract"]) it returns the ten values I need
But for some reason my $("#description"+(j+1)).text(ex["query"]["pages"][0]["extract"]); only works in console, when I plug in the values by manually. Even though the code returns the values I want perfectly up to that point Dan Stockham @DanStockham Feb 03 2016 02:25 UTC Can anyone see why the online folks are coming back as undefined? http://codepen.io/DanStockham/pen/pgEYGw?editors=0010 Matt Yamamoto @MattYamamoto Feb 03 2016 02:25 UTC @keccakec it's an asynchronous issue. put your getJSOn in another function and then call that function in your loop Kevin Elser @CoffeeCodeKevin Feb 03 2016 02:26 UTC @MattYamamoto I'm currently calling a function that inputs all the titles into the #title1-10 and then calling getdesc() immediately after. Would that be an incorrect way to do it? I ask because it confuses me that it's returning the descriptions, but only in console Matt Yamamoto @MattYamamoto Feb 03 2016 02:28 UTC If you put a console.log inside the success function of your getJSON, you should see the same value being logged, no? Dan Stockham @DanStockham Feb 03 2016 02:29 UTC Nevermind, I goofed big time. I didn't call the property names in the JSON stream object. Matt Yamamoto @MattYamamoto Feb 03 2016 02:31 UTC @keccakec you need a way to presevere the state of i when the getJSON is initiated. so wrap the getJSON in another function that takes the iterator as an argument. function getdesc() { getData(num) {$.getJSON(yourURL, function(ex) {
$("#description"+(j+1)).text(ex["query"]["pages"][0]["extract"]); }); } for (j=0; j<10;j++) { var title2=($("#title"+(j+1)).html())
getData(i);
}
}
Kevin Elser
@CoffeeCodeKevin
Feb 03 2016 02:33 UTC
@MattYamamoto Thanks, I'll give that a try. And yeah, I saw that it was returning multiple values, but after looking at them, they're the right ten, but in random orders and usually not 10 in a row without repeats. I don't entirely grasp why, but I'll try to avoid doing this again
CamperBot
@camperbot
Feb 03 2016 02:33 UTC
keccakec sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:star: 902 | @mattyamamoto | http://www.freecodecamp.com/mattyamamoto
Zac Clemans
@zaclem01
Feb 03 2016 02:34 UTC
OK...I'm in callback hell here. Can anyone tell me a better way to manage listening for events when you have to repeat it over and over again until some end state? I'm working on the Simon says zipline. Everything appears to work, but the deep I get into the user input (clicking the buttons to match the sequence), the deeper the callbacks go. Here's the barebones outline http://codepen.io/thalpha/pen/XXBdNq?editors=1010
the console after running a few times
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:36 UTC
@keccakec I think it's odd that you even got 10 different values. I'd have to see you full code. But the API requests are all asynchronous, so the just zip off and come back in whatever order the get fullfilled by the server (which isn't necessarily the order you sent them), so one wouldn't expect them to come back in order.
tommy
@tommygebru
Feb 03 2016 02:39 UTC
Looking for constructive criticism :wink2: my code is not in order and i hope to still include a jquery effect like page scrolling animation or learn toggle... I tried to make it responsive by avoiding media queries and multiple layouts :+1:
http://codepen.io/gebrutommy/pen/GoBWKG?editors=1010
Zac Clemans
@zaclem01
Feb 03 2016 02:39 UTC
I've even looked into promises to get away from the way these asynchronous functions behave. Maybe I think too linearly lol. I understand them in general, just not when you have to repeatedly call them...
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:39 UTC
@zaclem01 I don't think that's callback hell... you are in multiple click binding hell! :smile: I think the issue is that every time your getPlayerInput method is run that you then run listenForInput which then adds a click binding to your btns. So each time you add another binding. Which means one user click will result in multiple executions of the click function.
@zaclem01 actually, I see your .off() in there... so let me look deeper.
Zac Clemans
@zaclem01
Feb 03 2016 02:42 UTC
@tommygebru Not a designer or even very artistic, so take with a grain of salt, but I've always heard and find that sans-serif fonts are easier to read for paragraphs or sentences. I think it might help to switch to that in your description and other sections.
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:42 UTC
@zaclem01 no, wait... that will only remove the click event from the btn that was clicked. yeah, I'm pretty sure you have a click binding multiple times problem.
Zac Clemans
@zaclem01
Feb 03 2016 02:43 UTC
@MattYamamoto So remove from all of the button class?
turn off rather
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:43 UTC
@tommygebru there is a weird horizontal scroll going on.
@zaclem01 well, I'm going to say I don't think so, because if the pattern is 3 buttons, I need to be able to press three buttons. It's probably better to do the click binding only once, and then in the click function use a boolean flag to determine whether the user is allowed to be clicking a button. I'm sure there are other ways, but that is the way I tend to do it (so I'm biased that way).
Zac Clemans
@zaclem01
Feb 03 2016 02:45 UTC
I just wasn't sure how to continually get the input starting with the first click
@MattYamamoto Right, need to keep the click functionality for the others. I think I understand, but I'm not sure how to do that and keep it in my method. I'll take a look and try it out though. Thanks! (I'll probably be back)
CamperBot
@camperbot
Feb 03 2016 02:47 UTC
zaclem01 sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:47 UTC
@zaclem01 well, if you define your click function somewhere else, maybe in an init method or something, and have it use a boolean, playerTurn for example, then in your .getPlayerInput() method you could just set playerTurn = T and that would let the click events do something. Does that make sense?
CamperBot
@camperbot
Feb 03 2016 02:47 UTC
:star: 903 | @mattyamamoto | http://www.freecodecamp.com/mattyamamoto
tommy
@tommygebru
Feb 03 2016 02:49 UTC
@MattYamamoto i know :smile:.....but dont know how to fix i tried messing with width and margins :thumbsup: what do you think ?
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:49 UTC
@tommygebru also, avoid using lots of <br> for layout. Use your css for positioning/sizing.
@tommygebru I'm looking at it for you... let me see what I can see.
Zac Clemans
@zaclem01
Feb 03 2016 02:49 UTC
So only set playerTurn to true once the adding and displaying is done?
tommy
@tommygebru
Feb 03 2016 02:50 UTC
@zaclem01 I wanted something that had a little thickness maybe resembled code and/or i don't know set itself apart but still legible :smile:
Zac Clemans
@zaclem01
Feb 03 2016 02:50 UTC
And if it is true start comparing to the sequence?
@tommygebru Gotcha. Overall I think it looks pretty good. Just caught my eye
tommy
@tommygebru
Feb 03 2016 02:51 UTC
@MattYamamoto HAHA yes I thought it was the easiest way to have stable spacing :smile: what do you have in mind ?
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:51 UTC
@zaclem01 yes, If I understand what your saying. Essentially your playerTurn is just the gate keeper to some chunck of code in the click function. so yes, if playerTurn is true then light up the buttons when the user clicks and compare the button press to the expected sequence. whenever the player's turn is done, just set the boolean back to false and their clicks won't do anything anymore.
tommy
@tommygebru
Feb 03 2016 02:52 UTC
@zaclem01 also because the page is gray and not a lot of color going on, I thought maybe the font would hold color well :+1:
Matt Leonard
@matty22
Feb 03 2016 02:55 UTC
Anyone have any suggestions on good sources on very basics of using an API? Getting started on the Local Weather app and not really sure where to start with the API.
tommy
@tommygebru
Feb 03 2016 02:56 UTC
@matty22 are there hints on the zipline page?
Matt Leonard
@matty22
Feb 03 2016 02:56 UTC
Just that we should use the OpenWeather API, but I'm looking for something more general "How to use an API in JS" type resource
tommy
@tommygebru
Feb 03 2016 02:58 UTC
i don't know if this is relevant but one of the first google hits @matty22
Matt Leonard
@matty22
Feb 03 2016 02:59 UTC
@tommygebru I saw that, but also not sure if it's relevant.
tommy
@tommygebru
Feb 03 2016 03:00 UTC
haha im not there yet ..... :wink2:
@MattYamamoto how do you space your divs ?
Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:05 UTC
@tommygebru okay, wow. so your h2 font-size is way too big and that's causing the horizontal scroll. Now, I mean this in the gentlest way, but your css is a complete mess. But your html needs some work too. First, I'd restrucutre your html bit. Think of divs as containers, so make a div for each section.. then inside those put other divs as necessary for the content of that section. Then, use the css to style those divs. You can give them height so they take up an apporpriate amount of vertical space... you can use margins and padding on the sections to keep stuff spaced out. A lot of people will but borders around their divs just for layout purposes so you can see where each one is and how big it is, etc. My advice to you is to slow down a bit and be a little more methodical. What you have visually looks pretty good, but for your own sanity, clean up the code side and you'll be able to more easily add content in expected ways.
I would add, clearly you mostly understand what I was saying about using divs as containers, but take that idea further.
tommy
@tommygebru
Feb 03 2016 03:08 UTC
This message was deleted
CamperBot
@camperbot
Feb 03 2016 03:08 UTC
tommygebru sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:star: 904 | @mattyamamoto | http://www.freecodecamp.com/mattyamamoto
Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:09 UTC
@tommygebru you're welcome... I'm not trying to be too negative, I just want to keep you from driving yourself crazy and giving up. You got it, just a little slower and a little more deliberate
tommy
@tommygebru
Feb 03 2016 03:11 UTC
@MattYamamoto thanks for the advice :fire: :fire: :fire:
so there should be plenty of nesting of divs... cleaner code (on that right now)...
the *h1 font needs to be changed (but how? I want the same effect).... have fixed heights......use a wireframe.... is that everything you said?
CamperBot
@camperbot
Feb 03 2016 03:11 UTC
tommygebru sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:warning: tommygebru already gave mattyamamoto points
Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:12 UTC
@tommygebru If you want something actionable, I'd do a search and repalce in your html and get rid of all the <br>, and then clear out your css. Just for designing purposes add * {border: 1px dashed red} to your css, then one by one start styling your divs, adding outer divs as necessary.
@tommygebru what is the effect you are after for your h2?
if you just want to keep it proportional, just use a smaller value of the vw for your font size.
tommy
@tommygebru
Feb 03 2016 03:14 UTC
@MattYamamoto this was my 3rd attempt at a completely different portfolio ... i like this one .....im going to commit to this one :wink2: I was a little fast, few hours but a lot of tweaking and learning in between :smile:
Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:15 UTC
try 17vw... that's about as big as you can go without a horizontal scroll at small screen sizes. I stay stick with this one. visually it looks good, so your vision is good.
tommy
@tommygebru
Feb 03 2016 03:16 UTC
@MattYamamoto I kind of just want a landing page equivalent with the h1 and have the button signal "there's more below"
@MattYamamoto nice :+1: red will pop up well on my page

@MattYamamoto haha design can be so conflicting sometimes wouldn't you agree

try 17vw... that's about as big as you can go without a horizontal scroll at small screen sizes. I stay stick with this one. visually it looks good, so your vision is good.

Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:17 UTC
@tommygebru I think you can give your .enlarge class a height of 100vh, is that what your after? And my red border was just a suggestion to visualize what's there, not to keep for production...unless of course you like it.
oh, I think you want to see the arrow... try something like 40vh instead
tommy
@tommygebru
Feb 03 2016 03:19 UTC
@MattYamamoto very nice thanks on smaller screens there is no more horizontal shaking :smile: whats odd though is i am on a small laptop and won't know what my work looks like fully :wink2:
CamperBot
@camperbot
Feb 03 2016 03:19 UTC
tommygebru sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:warning: tommygebru already gave mattyamamoto points
Zac Clemans
@zaclem01
Feb 03 2016 03:21 UTC
@MattYamamoto You are a lifesaver. Let me know if this is wrong, but I think I got it http://codepen.io/thalpha/pen/mVjggv?editors=0010
Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:22 UTC
@tommygebru yeah, well I suppose you can always ask others how it looks. :smile: I gotta run (it's dinner time), but I wish you the best of luck.
tommy
@tommygebru
Feb 03 2016 03:22 UTC
@MattYamamoto no i understand wireframes .... red will work well on top of everything .....should I be removing everything ? when wireframing my html & css ?
huh I didnt think of the arrow :+1: good one
@MattYamamoto and i wish you the best !
Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:22 UTC
@zaclem01 just took a quick glans... and it's working way better. From a quick once over it looks like you're doing it right.
@tommygebru well... there is alot of unecessary stuff in your css that might get in the way. If it was me, I'd wipe out the css and start fresh... but of course, you're free to do as you wish.
Zac Clemans
@zaclem01
Feb 03 2016 03:23 UTC
@MattYamamoto awesome! never would have thought of only binding it once and then checking on a condition. All my previous experience is very linear in nature. Javascript makes you think in circles sometimes.
Thank you again!
Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:24 UTC
yeah, I just recognized what was going on from doing that a few too many times myself!
alright, night all (well, I may be back later) :smile:
tommy
@tommygebru
Feb 03 2016 03:24 UTC
ok I will try to pm you tomorrow :+1:
CompGeekGirl
@LisaRamos
Feb 03 2016 03:32 UTC
Can anyone help me out with this calculator project I have here? http://codepen.io/lisaramos/pen/MKBmgm I'm trying to calculate numbers to a total and I'm having difficulty. Is there anything wrong with the code that I provided in the link?
Ashley
@atan77
Feb 03 2016 03:40 UTC
@LisaRamos any reason you want to use jquery instead of vanilla JS?
CompGeekGirl
@LisaRamos
Feb 03 2016 03:46 UTC
@atan77 I'm not familiar with vanilla JS but I was told to use math.js
Ashley
@atan77
Feb 03 2016 03:46 UTC
@LisaRamos vanilla JS as in JS without packages or jquery
you can get this done with an array and getElementById and the built in operators, to keep going down your path, it looks like you need some way to store the values you've entered, maybe an array and then perform an action on it with your math operation buttons
CompGeekGirl
@LisaRamos
Feb 03 2016 03:51 UTC
@atan77 Do you think it would work with vanilla.js?
Ashley
@atan77
Feb 03 2016 03:52 UTC
sorry, I shouldn't have called it that, it might simplify things if you just use JS rather than having math.js and jquery mixed in
CompGeekGirl
@LisaRamos
Feb 03 2016 03:54 UTC
@atan77 Other people have suggested math.js and jQuery. Now that I've removed those, I can't get my calculator to enter in numbers.
Eric Yohansa
@eyohansa
Feb 03 2016 04:00 UTC
$selector is jQuery syntax. If you are still using$ but have removed jQuery lib then your calculator would not work.
Ashley
@atan77
Feb 03 2016 04:05 UTC
@LisaRamos generically what you're trying to do, regardless if you use packages or not, is that on click you want either a number to be recorded or an operation to be recorded, then when equals is clicked the sequence that's been entered needs to be evaluated, so what you may want to look at is how you get a value sent to a function via a button click
CompGeekGirl
@LisaRamos
Feb 03 2016 04:05 UTC
@eyohansa I tried that and no numbers would go through. So I had to bring back the jQuery library instead. The thing I'm trying to do is calculate numbers using operators. This is the code I have here so far.
var operators = ["/", "*", "-", "+"];

var block = "";
$('button').click(function() { if (this.class === "numBut") { // display this.id.innerHTML;$('#inputSec').text(this.class.innerHTML);
}
});
Ashley
@atan77
Feb 03 2016 04:07 UTC
@LisaRamos your current code doesn't do anything when an operator is clicked
you'll need some code to handle an operator click
CompGeekGirl
@LisaRamos
Feb 03 2016 04:08 UTC
@atan77 How would I do that?
Ashley
@atan77
Feb 03 2016 04:11 UTC
@LisaRamos you already created the code for numBut, it's just like that
Eric Yohansa
@eyohansa
Feb 03 2016 04:13 UTC
@LisaRamos, your operator buttons are calling operators function which you don't have. You do have operators array though.
CompGeekGirl
@LisaRamos
Feb 03 2016 04:40 UTC

@eyohansa Now how do I add those things you mentioned? I've been trying to figure this out but I can't calculate the numbers. I can enter numbers, clear them, and enter them again but I still can't calculate and total the numbers.

var operators = ["/", "*", "-", "+"];

var block = "";
$('button').click(function() { if (this.class === "numBut") { // display this.id.innerHTML;$('#inputSec').text(this.class.innerHTML);
} else if (operators.class === "op") {
var result = operators.test(/[0-9]\d/);
} else {
}
});

Is there something wrong with this code?

Eric Yohansa
@eyohansa
Feb 03 2016 04:45 UTC
Instead of checking class you can do $(.className) to select those buttons. So you can do something like $(".op").click(function() {
var op = $(this).text(); // This will get the text content of the op buttons, such as +, -, etc. switch(op) { case "+": result = storedNum1 + storedNum2; // other cases }$("#inputSec").text(result);
}
Eric Yohansa
@eyohansa
Feb 03 2016 04:52 UTC
If you take a look at your HTML, your op buttons are also calling operators function which you don't have.
CompGeekGirl
@LisaRamos
Feb 03 2016 05:04 UTC
@eyohansa So I added switch statements in the function. Am I on the right track to getting my calculator to calculate and total numbers or not?
function operators(block, decimalAdded) {
$('.op').click(function() { var op =$(this).text();
switch (op) {
case "+":
result = storedNum1 + storedNum2;
break;
case "-":
result = storedNum1 - storedNum2;
break;
case "*":
result = storedNum1 * storedNum2;
break;
case "/":
result = storedNum1 / storedNum2;
break;
default:
console.log("=");
}
$('#inputSec').text(result); }); } Ashley @atan77 Feb 03 2016 05:15 UTC @LisaRamos if you're still using math.js why not use math.eval instead of all those switches? CompGeekGirl @LisaRamos Feb 03 2016 05:18 UTC @atan77 How do I use math.eval? Can you show me an example? Eric Yohansa @eyohansa Feb 03 2016 05:19 UTC @LisaRamos I sugget removing the onclick attribute from your buttons and fully handle the click event from JS. Ashley @atan77 Feb 03 2016 05:24 UTC @LisaRamos function total() { console.log('the result of your equation is: ' + math.eval(input));$('#inputSec').text(math.eval(input)); }
CompGeekGirl
@LisaRamos
Feb 03 2016 05:27 UTC
@eyohansa I removed the onclick attribute from the buttons except the clear. If I do that, nothing happens.
Eric Yohansa
@eyohansa
Feb 03 2016 05:28 UTC
@LisaRamos Have you decided to use math.js or not?

If you're using that, then you can do something like

$(".op").click(function() { var input =$("#inputSec").text();
input += $(this).text();$("#inputSec").text(input);
}

and add the total function from @atan77 and it should be done.

That math.js lib is a pretty nice shortcut.
CompGeekGirl
@LisaRamos
Feb 03 2016 05:33 UTC
@eyohansa Anyway, I would need to go for now. I'll discuss this later if that's okay with you.
Eric Yohansa
@eyohansa
Feb 03 2016 05:34 UTC
@LisaRamos Sure.
cannelflow
@cannelflow
Feb 03 2016 06:17 UTC
@brainyfarm thank you
CamperBot
@camperbot
Feb 03 2016 06:17 UTC
cannelflow sends brownie points to @brainyfarm :sparkles: :thumbsup: :sparkles:
:star: 1318 | @brainyfarm | http://www.freecodecamp.com/brainyfarm
Suryavamsi Tenneti
@Surya97
Feb 03 2016 07:22 UTC
hey guys my collapse navbar is not working when I am decreasing size of window
this is code <div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav pull-right size" >
<li><a id="navigate" href="#home">Home</a></li>
<li><a id="navigate" href="#project">Projects</a></li>
<li><a id="navigate" href="#contact">Contact</a></li>
</ul>
</div>
anyone plzz help
also the social buttons when minimised I want them in a single vertical line but could not do it. Plzz help guys
guys plzz help
Suryavamsi Tenneti
@Surya97
Feb 03 2016 07:37 UTC
anyone on?

@fewspider
Feb 03 2016 07:38 UTC
@Surya97 yeah
Suryavamsi Tenneti
@Surya97
Feb 03 2016 07:40 UTC
hey @fewspider plzz help me finding the bug
run my pen and click the collapse navigation bar but it is not working
kirbyedy
@kirbyedy
Feb 03 2016 07:42 UTC
your data target is wrong @Surya97

@fewspider
Feb 03 2016 07:45 UTC
@Surya97 home and about is ok
Suryavamsi Tenneti
@Surya97
Feb 03 2016 07:50 UTC
so @kirbyedy what should be the data target?
@fewspider yes
kirbyedy
@kirbyedy
Feb 03 2016 07:55 UTC
also I dont see you have bootstrap and jquery scripts
which are required in order to work
Ishan
@ishanshukla97
Feb 03 2016 07:56 UTC
i cant figure out how to build Random Quote machine project
please someone explain me how to get quote from a ur

@fewspider
Feb 03 2016 07:57 UTC
I am not sure your problem, want all social button display vertical？ @Surya97
Sandeep
Feb 03 2016 07:57 UTC

The below code iam using to fetch data from javascript object(JSON)

var obj = {
date: " 2012-10-18 16:58:35.104576",
data: [
{
title: "The Princess Bride",
rating: "PG",
length: 128,
stars: [
"Gary Elwes",
"Robin Wright",
"Christopher Guest"
]

},
{
title: "This is Spinal Tap",
rating: "R",
length: 105,
stars: [
"Christopher Guest",
"Michael McKean",
"Harry Shearer"
]}
]
};

$.each(obj.data[0] , function(ke , va ){ alert('key'+ke); });$.each(obj.data , function(key , value){ //

$.each(value.stars , function(k , v ){ alert(k+':'+v); }); }); Here i am looping obj.data twice is it necessary, because i want to echo the key in obj.data only once and values in obj.data multiple times Bruce Young @mutantspore Feb 03 2016 07:59 UTC @ishanshukla97 you can just us an array (or array of objects) that you put the quotes in yourself. APIs come later in the course. kirbyedy @kirbyedy Feb 03 2016 07:59 UTC +1 Ishan @ishanshukla97 Feb 03 2016 08:00 UTC ohkkay. thanks @mutantspore i was getting depressed as i was not able to figure it out. :worried: CamperBot @camperbot Feb 03 2016 08:00 UTC ishanshukla97 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles: :star: 1078 | @mutantspore | http://www.freecodecamp.com/mutantspore Suryavamsi Tenneti @Surya97 Feb 03 2016 08:01 UTC @fewspider yes after reducing the size of window I need all the social button displayed in vertical 蒲公英の生活 @fewspider Feb 03 2016 08:02 UTC copy that 蒲公英の生活 @fewspider Feb 03 2016 08:11 UTC @Surya97 try col-md-number, or set a min-width of li element fluffystub @RakshithNM Feb 03 2016 08:21 UTC Mocha @mocha3012 Feb 03 2016 09:01 UTC Hi everyone! Can anyone tell me what to do to make the tweet button work? It's supposed to share the quote on twitter. http://codepen.io/mocha3012/pen/jWKKqw @mocha3012 gl. Im out Mocha @mocha3012 Feb 03 2016 09:04 UTC @URobert ok thanks! CamperBot @camperbot Feb 03 2016 09:04 UTC mocha3012 sends brownie points to @urobert :sparkles: :thumbsup: :sparkles: :star: 550 | @urobert | http://www.freecodecamp.com/urobert Robert Uivarosi @URobert Feb 03 2016 09:18 UTC @mocha3012 yw fluffystub @RakshithNM Feb 03 2016 09:33 UTC <a href="#" class="btn btn-info btn-lg" role="button"><i class="fa fa-info-circle"></i>LinkedIn</a> am i doing it right? i want to add an icon into my button please help me anyone? Alexander Køpke @alexanderkopke Feb 03 2016 09:42 UTC I guess an icon would be an img element fluffystub @RakshithNM Feb 03 2016 09:45 UTC <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/> i have inserted this kirbyedy @kirbyedy Feb 03 2016 10:19 UTC <a href="#"><i class="fa fa-facebook"></i></a> Tomáš Kalný @Sleepy-guy Feb 03 2016 10:22 UTC http://codepen.io/Sleepy-guy/pen/adqjjq?editors=1010 PLEASE CAN JUST SOMEONE HELP ME ? I can't figure out why in my javascript code my line 25 isn't working and also when ni press = nothing happens Alexander @DurableMicron Feb 03 2016 10:38 UTC http://codepen.io/durablemicron/pen/yeEoXa hey guys how am i using boostrap wrong dont have I the row class / col in the right place? theres a horizotnal scrollbar under the portfolio section fluffystub @RakshithNM Feb 03 2016 10:59 UTC can i use more than one font from google fonts on my web page? Brennan G @BGogurt Feb 03 2016 11:00 UTC @DurableMicron when I get turn off the overflow: auto; the scrollbar goes away but there is still a white space there @RakshithNM I don't see why not, it will make your page longer to load though. Brennan G @BGogurt Feb 03 2016 11:08 UTC @DurableMicron It doesn't look like you really used any of bootstraps layout besides the navbar and the buttons. Take a look at how the containers and grid system works http://getbootstrap.com/css Brennan G @BGogurt Feb 03 2016 11:23 UTC If someone has time I'd like some feedback on how my portfolio looks and ways to make it look better (besides the color cause that'll change when can find the colors I like) Sujit Karki @Swoozeki Feb 03 2016 11:58 UTC @BGogurt you're supposed to have all the contents in one page, according to the instructions *checklist Jean Louis Borba Rosa Salbego @jlouiss Feb 03 2016 11:58 UTC guys what do you think about it? http://codepen.io/JLouisS/pen/jWvOOY Brennan G @BGogurt Feb 03 2016 12:01 UTC @Swoozeki Oh, I can change that I guess. Technically it is one page sort of. One html page. Thanks for catching that. CamperBot @camperbot Feb 03 2016 12:01 UTC bgogurt sends brownie points to @swoozeki :sparkles: :thumbsup: :sparkles: :star: 277 | @swoozeki | http://www.freecodecamp.com/swoozeki Brennan G @BGogurt Feb 03 2016 12:04 UTC @jlouiss looks good Ankit @ankitrn Feb 03 2016 12:08 UTC hey @jlouiss looks good but found a few issues here..The clock can pause but it resets when I try to resume it..also, it's a little annoying that the page keeps shifting up everytime I click on a "+" or "-" button. Hope I helped! Jean Louis Borba Rosa Salbego @jlouiss Feb 03 2016 12:10 UTC @ankitrn thanks, i'll fix it CamperBot @camperbot Feb 03 2016 12:10 UTC jlouiss sends brownie points to @ankitrn :sparkles: :thumbsup: :sparkles: :star: 255 | @ankitrn | http://www.freecodecamp.com/ankitrn SmikeyR @SmikeyR Feb 03 2016 12:36 UTC I have finished my "Simon". I'll appreciate some feedback. kirbyedy @kirbyedy Feb 03 2016 12:45 UTC @SmikeyR great job :thumbsup: the only thing that I would change is to disable user clicking while the computer is giving the task if its possible Alexander @DurableMicron Feb 03 2016 12:52 UTC thanks @BGogurt i didnt put the container part in CamperBot @camperbot Feb 03 2016 12:52 UTC durablemicron sends brownie points to @bgogurt :sparkles: :thumbsup: :sparkles: :star: 253 | @bgogurt | http://www.freecodecamp.com/bgogurt SmikeyR @SmikeyR Feb 03 2016 13:01 UTC @kirbyedy thx. I'll do that. CamperBot @camperbot Feb 03 2016 13:01 UTC smikeyr sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles: :star: 402 | @kirbyedy | http://www.freecodecamp.com/kirbyedy Cody Bouscaren @codybousc Feb 03 2016 13:05 UTC @SmikeyR very clean code! great job! mine's still a bit of a mess how much time did you spend on this? SmikeyR @SmikeyR Feb 03 2016 13:10 UTC @kirbyedy It's actually not that easy to fix... @codybousc I dunno. I spend some time every day, or none at all, and I started working on it... mb a week ago? Cody Bouscaren @codybousc Feb 03 2016 13:12 UTC @SmikeyR your code is great. it's easy to jump into and figure out what's going on. this is something that i strive for! SmikeyR @SmikeyR Feb 03 2016 13:13 UTC @codybousc thx. I'm trying to divide it into small steps, or I'm gonna get lost in it myself CamperBot @camperbot Feb 03 2016 13:13 UTC smikeyr sends brownie points to @codybousc :sparkles: :thumbsup: :sparkles: :star: 314 | @codybousc | http://www.freecodecamp.com/codybousc Cody Bouscaren @codybousc Feb 03 2016 13:14 UTC most times i feel like i'm stuck in the 'just getting things to work' phase and most projects don't feel like they've got enough structure. step by step though, i guess SmikeyR @SmikeyR Feb 03 2016 13:17 UTC I start with doing the easy and obvious parts, test them, and then try to assemble it all into something working sigursiguros @sigursiguros Feb 03 2016 13:53 UTC Hi can anyone tell me what's wrong with my code?$("#operators a, #side a").not("#equals, #decimal").click(function(){
if $("#sqrt").click(function(){ hasBeenClicked = true; operator = "sqrt"; return; } else { operator =$(this).text();
}
newnumber = number;
number = "";
totaldiv.text("0");
});
sigursiguros
@sigursiguros
Feb 03 2016 13:59 UTC
this wouldn't work either
$("#operators a, #side a").not("#equals, #decimal").click(function(){ if ($("#sqrt").clicked == true) {
operator = "sqrt";
$("#equals").click(); return; } else { operator =$(this).text();
}
newnumber = number;
number = "";
totaldiv.text("0");
});
I'm trying to test which button ID was clicked
Taras Yaremkiv
@Y-Taras
Feb 03 2016 14:03 UTC
Hello everyone! I would like to make my quote machine get quotes from the "https://market.mashape.com/andruxnet/random-famous-quotes#" using API ? I just have no idea how to do it. Is there any tutorial about that?
http://codepen.io/Y-Taras/pen/VedJwa - that's my machine using quotes from array of strings, and I want to change it instead of array - API
Jonathan Coleman
@jondcoleman
Feb 03 2016 14:06 UTC
@Y-Taras you can skip ahead to the JSON APIs and Ajax section
that's what you'll need
@sigursiguros is the event firing at all?
sigursiguros
@sigursiguros
Feb 03 2016 14:34 UTC
@jondcoleman i used if this.id=equals and it works now
thank you
@jondcoleman is there somethign wrong with my code:
$("#decimal").click(function(){ number = ""; var numOfDecs = "0"; for (i=0,i<number.length;i++){ if (number.charAt("i") = ".") { (parseInt(numOfDecs,10) + 1).toString(10); } if (numOfDecs === "0"){ number.append("."); } totaldiv.text(number); textNumlength(number); }; }); sigursiguros @sigursiguros Feb 03 2016 14:49 UTC it's saying syntax error but I can't find the problem $("#decimal").click(function(){
number = "";
var numOfDecs = "0";
for (i=0,i<number.length,i++) {
if (number.charAt("i") = ".") {
numOfDecs = (parseInt(numOfDecs,10) + 1).toString(10);
}
};
if (numOfDecs === "0") {
number.append(".");
totaldiv.text(number);
testNumlength(number);
}
});
Cody Bouscaren
@codybousc
Feb 03 2016 15:07 UTC
This message was deleted
Sujit Karki
@Swoozeki
Feb 03 2016 15:08 UTC
Time to start the Pomodoro clock
Cody Bouscaren
@codybousc
Feb 03 2016 15:09 UTC
can someone please help me understand this? it hits the final while loop 50 times, as it should, but on the 4th iteration it starts to subtract a bit more than one cent--which is confusing to me!
function drawer(price, cash, cid) {
var change = cash - price;

console.log(change);

while(change >= 100 && cid[8][1] >= 100) {
change-= 100;
cid[8][1]-= 100;
console.log("Subtracted One Hundred");
}
while(change >= 20 && cid[7][1] >= 20) {
change-= 20;
cid[7][1]-= 20;
console.log("Subtracted Twenty");
}
while(change >= 10 && cid[6][1] >= 10) {
change-= 10;
cid[6][1]-= 10;
console.log("Subtracted Ten Dollars");
}
while(change >= 5 && cid[5][1] >= 5) {
change-= 5;
cid[5][1]-= 5;
console.log("Subtracted One Five Dollars");
}
while(change >= 1 && cid[4][1] >= 1) {
change-= 1;
cid[4][1]-= 1
console.log("Subtracted One Dollar");
}
while(change >= .25 && cid[3][1] >= .25) {
change-= .25;
cid[3][1]-= .25;
console.log("Subtracted 25 Cents");
}
while(change >= .10 && cid[2][1] >= .10) {
change-= .10;
cid[2][1]-= .1;
console.log("Subtracted 10 Cents");
}
while(change >= .05 && cid[1][1] >= .05) {
change-= .05;
cid[1][1]-= .05;
console.log("Subtracted 5 Cents");
}
while(change >= .00 && cid[0][1] >= .00) {
change-= .01;
cid[0][1]-= .01;
console.log("Subtracted 1 Cent");
console.log(change);
}

for(var i = 0; i < cid.length; i++) {
if(cid[i][1] == 0 && change == 0) {
console.log("Closed");
}
else if(cid[i][1] < 0) {
console.log("Insufficient Funds");
console.log(cid[i][0]);
}
}

console.log(cid);
console.log(change);
}

drawer(19.50, 20.00, [["PENNY", 0.50], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])
WCat
@wcat13
Feb 03 2016 15:40 UTC
A
@a-d-collins
Feb 03 2016 15:44 UTC
Does anyone know why the 'fire' symbol is shifting down after it has faded in?
See code below:
<!DOCTYPE html>
<html>
<title>Page Title</title>
<body>
<a>
<div id="project">
<div class="project-picture project_1_picture">
<div class="overlay">
</div>
<div class="fire"><i class="fa fa-fire"></i></div>
</div>
<div class="project-name"></div>
</div>
</a>

</body>

<style>
#project {
position: relative;
display: inline-block;
height: 230px;
width: 250px;
border: 2px silver solid;
margin: 3px 8px 30px 8px;
transition: all 0.3s ease-in-out;
}

/* Create hidden pseudo-element */
/* include the shadow for the end state */
#project::after {
content: '';
position: absolute;
z-index: -1;
top: 0;
left: 0;
height: 230px;
width: 250px;
opacity: 0;
transition: opacity 0.3s ease-in-out;
}

/* Scale up the box */
#project:hover {
transform: scale(1.03, 1.03);
}

#project:hover::after {
opacity: 1;
}

.project-picture {
diplay: block;
height: 150px;
width: 250px;
background-color: blue;
opacity: .9;
}

.overlay {
height: 150px;
width: 250px;
background-color: none;
opacity: .7;
transition: background-color 0.5s ease;
}

.project_1_picture {
background-color: blue;
background-size: cover;
}

.project-name {
diplay: block;
width: 250px;
height: 80px;
background-color: black;
opacity: .9;
}

.project-picture:hover .overlay{background-color: black}

.fire{
position: absolute;
display:block;
opacity: 0;
top:36px;
width:40px;
margin:0 auto;
left:0px;
right:0px;
z-index:100;
font-size: 45px;
color: white;
transition: opacity 0.5s ease;
}

.project-picture:hover .fire{opacity:1}

</style>
</html>
Blauelf
@Blauelf
Feb 03 2016 15:45 UTC
@codybousc You are using floating point variables, it is impossible to write 0.01 in binary with a finite number of digits. Convert to cents, and in the end, convert back, is the easiest, I think. Otherwise, between the steps, round on full cents, might work, too.
A
@a-d-collins
Feb 03 2016 15:47 UTC
Cool. I'll give that a run. -- Is the code hard to read, by the way?
The more I write the more I try to make things easy to read.
A
@a-d-collins
Feb 03 2016 15:53 UTC
Oh wait haha you weren't talking to me
@unlimiworks
Feb 03 2016 16:04 UTC
Hello guys
cannelflow
@cannelflow
Feb 03 2016 16:04 UTC
anyone can help me find some reference for making Wikipedia Viewer's search box auto complete
Arnaud Casamé
@arnaudcasame
Feb 03 2016 16:04 UTC
@a-d-collins you have some typos in ur css code. Check your .project-name selector, you typed diplay instead of display. Same for your .project-picture selector
@unlimiworks
Feb 03 2016 16:04 UTC
I have a little problem in the random quote machine
It seems my randomQuote() only runs once ?
The desired behaviour is to call for randomQuote() each time I click on the button too, but for some reason, it doesn't happen
@Arkine
Feb 03 2016 16:09 UTC
do you mean your newQuote() function?
@unlimiworks
Feb 03 2016 16:11 UTC
Yes
@Arkine
Feb 03 2016 16:12 UTC
Ok just a sec while I test a few things
@unlimiworks
Feb 03 2016 16:12 UTC
Thank you, i'll be doing the same
Robert Uivarosi
@URobert
Feb 03 2016 16:12 UTC
HI guys. Quick question: do you have any idea why using position:fixed; on my container disables my buttons within ?
@Arkine
Feb 03 2016 16:13 UTC
disables?
@unlimiworks
Feb 03 2016 16:13 UTC
@URobert it shouldn't
Robert Uivarosi
@URobert
Feb 03 2016 16:14 UTC
@UnlimiWorks well it does. as I uncomment that line in CSS, buton functionality returns to normal
@unlimiworks
Feb 03 2016 16:14 UTC
What do you mean by disables ? As in Property Disabled=true ?
Or in case you're using buttons to navigate within the container, you shouldn't give it a fixed display setting
A
@a-d-collins
Feb 03 2016 16:15 UTC
@djcase001 Thanks!
CamperBot
@camperbot
Feb 03 2016 16:15 UTC
a-d-collins sends brownie points to @djcase001 :sparkles: :thumbsup: :sparkles:
:star: 135 | @djcase001 | http://www.freecodecamp.com/djcase001
@unlimiworks
Feb 03 2016 16:16 UTC
Display:fixed always will "fix" the block in your screen, that way it will always be visible, and if it's too big to show, it will only display the top part that fits
Robert Uivarosi
@URobert
Feb 03 2016 16:18 UTC
@UnlimiWorks I said nothing about display, but : position:fixed; of the container. it acts like disable=true, in the meaning that they can't be clicked and no hover effect (otherwise working) is not displayed. The buttons should not do anything in particular as they are not locked to event handlers yet.
@unlimiworks
Feb 03 2016 16:18 UTC
I mean position: fixed. sorry
I see
A
@a-d-collins
Feb 03 2016 16:18 UTC
@djcase001 Alright. I've fixed those typos. Unfortunately the original issue is still present
@unlimiworks
Feb 03 2016 16:19 UTC
I'm afraid i can't help, sorry. Can i check your code ?
Robert Uivarosi
@URobert
Feb 03 2016 16:22 UTC
@UnlimiWorks i fixed it with: z-index:1; on container . But thanks !
CamperBot
@camperbot
Feb 03 2016 16:22 UTC
urobert sends brownie points to @unlimiworks :sparkles: :thumbsup: :sparkles:
:star: 286 | @unlimiworks | http://www.freecodecamp.com/unlimiworks
@Arkine
Feb 03 2016 16:24 UTC
@UnlimiWorks Sorry, at work so every few minutes I jump back and forth
@unlimiworks
Feb 03 2016 16:25 UTC
@Arkine Don't worry, i'm grateful for the intentions. I'll leave that one and fork it to see if i can find the problem on my end too
Ankit
@ankitrn
Feb 03 2016 16:35 UTC

hey guys, just finished my pomodoro clock (hopefully there aren't any errors lol) what do you think?

Jessi L Wasell
@JessiW
Feb 03 2016 16:35 UTC
Hi - I'm having a little trouble with my Simon Game - could someone help me?
Right now I have it going from one level to the next, but for some reason, it doesn't replay the whole sequence each time, just the new step.... wondered if someone would be willing to look at my code, I'll paste the link in a sec....
not exactly sure what I'm missing....
Hey @ankitrn - I'd be happy to look!
@ankitrn - nice work, I like it and it works great!
Jessi L Wasell
@JessiW
Feb 03 2016 16:41 UTC
Didn't see any issues, I think you've done well...
@ankitrn
Ankit
@ankitrn
Feb 03 2016 16:41 UTC
@JessiW Thank you :)
CamperBot
@camperbot
Feb 03 2016 16:41 UTC
ankitrn sends brownie points to @jessiw :sparkles: :thumbsup: :sparkles:
:star: 404 | @jessiw | http://www.freecodecamp.com/jessiw
Jessi L Wasell
@JessiW
Feb 03 2016 16:42 UTC
no problem.... :+1:
@ankitrn
@Arkine
Feb 03 2016 16:44 UTC
@UnlimiWorks Can't figure that one out. It calls the functions once then disables the click events on the buttons.
@unlimiworks
Feb 03 2016 16:45 UTC
@Arkine Yes, It doesn't make sense to me. Thanks ! It seems it's a jquery thing
CamperBot
@camperbot
Feb 03 2016 16:45 UTC
unlimiworks sends brownie points to @arkine :sparkles: :thumbsup: :sparkles:
:star: 32 | @arkine | http://www.freecodecamp.com/arkine
Jessi L Wasell
@JessiW
Feb 03 2016 16:55 UTC
anyone still here?
@unlimiworks
Feb 03 2016 16:56 UTC
I am, but I didn't begin the pomodoro yet, I don't think i can be of much help
Good luck finding someone :) Try helpZiplines
Jessi L Wasell
@JessiW
Feb 03 2016 16:57 UTC
Okay that's alright I actually needed help with the simon game....
@unlimiworks
Feb 03 2016 16:57 UTC
I mean simon*
Jessi L Wasell
@JessiW
Feb 03 2016 16:57 UTC
@UnlimiWorks - thanks I'll ask there.... no problem :)
CamperBot
@camperbot
Feb 03 2016 16:57 UTC
jessiw sends brownie points to @unlimiworks :sparkles: :thumbsup: :sparkles:
:star: 287 | @unlimiworks | http://www.freecodecamp.com/unlimiworks
Cody Bouscaren
@codybousc
Feb 03 2016 17:16 UTC
@Blauelf thanks for the feedback!
CamperBot
@camperbot
Feb 03 2016 17:16 UTC
codybousc sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star: 1117 | @blauelf | http://www.freecodecamp.com/blauelf
Arnaud Casamé
@arnaudcasame
Feb 03 2016 17:26 UTC
@a-d-collins
Cody Bouscaren
@codybousc
Feb 03 2016 17:38 UTC
@Blauelf by convert to cents, did you mean just multiply the value by 100? Even that's giving me a strange result
Arnaud Casamé
@arnaudcasame
Feb 03 2016 17:52 UTC
@a-d-collins erase the position and the display property of your .fire selector
Naveen Kumar
@naveenbanda
Feb 03 2016 18:05 UTC
can some1 plz tell me how to include multiple background images in portfolio object
knock knock!!
can some1 plz tell me how to include multiple background images in portfolio project
Alexander Køpke
@alexanderkopke
Feb 03 2016 18:11 UTC
@naveenbanda I don't understand your question. Don't you just mean images?
cannelflow
@cannelflow
Feb 03 2016 18:12 UTC
@naveenbanda add image in every container
Naveen Kumar
@naveenbanda
Feb 03 2016 18:13 UTC
yeah! I mean when we scroll down different background images comes
as in the infinito website
cannelflow
@cannelflow
Feb 03 2016 18:14 UTC
@naveenbanda add separate image in container
@naveenbanda like 1 container for home have image then container for about have other image
Naveen Kumar
@naveenbanda
Feb 03 2016 18:15 UTC
thanks!!
Arnaud Casamé
@arnaudcasame
Feb 03 2016 18:20 UTC
background:
url(icon.png) top left no-repeat,
url(texture.jpg),
url(top-edge.png) top left repeat-y;
}
@naveenbanda here is an example: background:
url(icon.png) top left no-repeat,
url(texture.jpg),
url(top-edge.png) top left repeat-y;
}
Joseph Morse
@jnmorse
Feb 03 2016 18:33 UTC
wiki format
CamperBot
@camperbot
Feb 03 2016 18:33 UTC

## :point_right: code formatting [wiki]

### Inline code

This an inline <paste code here> code formatting with a single backtick() at start and end around the code.

### Code Block

js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

 ⇦ Type 3 backticks, then press [enter ⏎]

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

Dan Stockham
@DanStockham
Feb 03 2016 18:33 UTC
So what do you guys think? http://codepen.io/DanStockham/full/pgEYGw/
Joseph Morse
@jnmorse
Feb 03 2016 18:37 UTC
Dan Stockham
@DanStockham
Feb 03 2016 18:38 UTC
Yeah I just noticed that, fixing now.
Dan Stockham
@DanStockham
Feb 03 2016 18:43 UTC
it's fixed now.
or not
Joseph Morse
@jnmorse
Feb 03 2016 18:45 UTC
@DanStockham the channels returns a item url which has the link you want
Dan Stockham
@DanStockham
Feb 03 2016 18:48 UTC
It's working now, though the items that don't have images are returning 404
I don't like that.
Ah that's fixed now.
Joseph Morse
@jnmorse
Feb 03 2016 18:51 UTC
@DanStockham you need to change where you have data._links.self __links contains api end points, data.url or data.streams.channel.url
@DanStockham nm I see you got it now, was still shwoing the _links when I refreshed last
Dan Stockham
@DanStockham
Feb 03 2016 18:53 UTC
@jnmorse No problem, thanks for looking into for me.
CamperBot
@camperbot
Feb 03 2016 18:53 UTC
danstockham sends brownie points to @jnmorse :sparkles: :thumbsup: :sparkles:
:star: 358 | @jnmorse | http://www.freecodecamp.com/jnmorse
Russell Wheatley
@russellwheatley
Feb 03 2016 18:54 UTC
Could someone help me understand how to update the value of var i, it's like the last thing I need to complete my pomodoro clock and I've worked all day trying to figure it out! To make it easy to view, I've put it in its own pen :)
http://codepen.io/Rusticman/pen/jWYZEd?editors=1010
Dan Stockham
@DanStockham
Feb 03 2016 18:58 UTC
Great it's working now.
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:00 UTC
@Rusticman it seems like it is updating
which element are you wanting to update with the value of i on click?
Russell Wheatley
@russellwheatley
Feb 03 2016 19:03 UTC
@jondcoleman It updates the HTML, but I want it to update the var i in javascript so I can use it to initialize my clock. The clock will start at 30 regardless of the function
i.e.
<div id="sessionValue">30</div>
I can't figure out how to grab the updated value and use it for my clock
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:04 UTC
so you want i to pull the value from sessionValue element?
Russell Wheatley
@russellwheatley
Feb 03 2016 19:04 UTC
yes
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:04 UTC
ok one sec
var i = parseInt(document.getElementById('console-log').innerHTML);
Russell Wheatley
@russellwheatley
Feb 03 2016 19:06 UTC
@jondcoleman thanks man! I'll give that a try :)
CamperBot
@camperbot
Feb 03 2016 19:06 UTC
rusticman sends brownie points to @jondcoleman :sparkles: :thumbsup: :sparkles:
:star: 489 | @jondcoleman | http://www.freecodecamp.com/jondcoleman
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:07 UTC
sorry I put the wrong element in the code
var i = parseInt(document.getElementById('sessionValue').innerHTML);
that's the id you wanted
@Rusticman
Russell Wheatley
@russellwheatley
Feb 03 2016 19:08 UTC
yeah, that's the one @jondcoleman
Dan Stockham
@DanStockham
Feb 03 2016 19:11 UTC
Good, The Twitch project is done for now.
Russell Wheatley
@russellwheatley
Feb 03 2016 19:13 UTC
@jondcoleman unfortunately, it's still not working
http://codepen.io/Rusticman/pen/jWYZEd?editors=1010
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:14 UTC
what are you trying to do there @Rusticman?
you want to set m to the new value every time the button is clicked?
Russell Wheatley
@russellwheatley
Feb 03 2016 19:17 UTC
My issue is, I need a variable outside the function that will pass the new value for the clock to initialize. So for example, the session time is set to 30 mins. If the user changes it to 35 mins, I need the variable to store that new value and pass it to my clock function. So far, I'm able to get the value to change on the console, but when I start the clock, it starts at 30. I'm a little fried at the moment because I've been trying all day to no avail so sorry for the confusion :) @jondcoleman
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:18 UTC
in your example what sets the session time?
or what should
Russell Wheatley
@russellwheatley
Feb 03 2016 19:19 UTC
The session time is set to 30 in var 1
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:19 UTC
yep ok
so how would that be changed to 35 as in your description above
by clicking the button?
maybe it would easier if you shared the actual timer
so I can understand what you are trying to do
Russell Wheatley
@russellwheatley
Feb 03 2016 19:21 UTC
The button is clicked, it increments var i to 31. I want that value to be passed to the clock......ok, I'll share it
@jondcoleman
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:25 UTC
reviewing now
because right now they are being set when the page loads so they'll always be the initial value
whereas if you set them in your start function they will grab the current values (i for instance)
Russell Wheatley
@russellwheatley
Feb 03 2016 19:28 UTC
move var i and m into the start function? or do I need to initialise the increment function in the start function?
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:29 UTC
that's just for session time. You'll probably need to do similar for other values
Russell Wheatley
@russellwheatley
Feb 03 2016 19:32 UTC
That is splendid, thank you so much :) I can figure it out now. Man, I've been fighting that all day, tinkering with the increment function when it was the blasted start function that needed changing! :)
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:34 UTC
@Rusticman do you understand why that works?
Russell Wheatley
@russellwheatley
Feb 03 2016 19:35 UTC
Honestly, I don't. I don't understand why it works inside a function and not outside
The start function isn't changing the i variable, so it doesn't make much sense
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:36 UTC
because var sessionTime = i * 60; is called when the page loads
and never called again
so even if you updated i (which is happening correctly)
sessionTime will never update
so when you call startPause() with sessionTime = i * 60
it gets the current value of i for setting the value
essentially it has to do with the timing of when you set the value of sessionTime
you need to set it after you've incremented the value of i
Russell Wheatley
@russellwheatley
Feb 03 2016 19:38 UTC
ok, I understand that now, it does make sense. Thanks. I should really have asked that question, it's the only way I'll learn
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:39 UTC
yeah :)
no problem!
Russell Wheatley
@russellwheatley
Feb 03 2016 19:40 UTC
thanks mate :)
sean9
@sean9
Feb 03 2016 20:06 UTC
question, based off what we learned, are we supposed to to be able to do these frontend dev projects?
Joseph Morse
@jnmorse
Feb 03 2016 20:07 UTC
@sean9 suppose to be the idea.
@sean9 can always use additional resources like the jQuery documentation https://api.jquery.com/ and any JavaScript documentation like at the MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript or just asking for help
sean9
@sean9
Feb 03 2016 20:16 UTC
im trying to get the new quote button to work
Moisés Man
@moigithub
Feb 03 2016 20:26 UTC
@sean9 on rannum line .. u have quotepool... remember JS is casesensitive.. should be quotePool (as u have declared above)
and u trying to access MyFunction() from ur html... but thats declared inside $(document).ready(function() { so it wont find.. out of scope... try removing $(document).ready(function() {
fixing those 2 things should work...
sean9
@sean9
Feb 03 2016 20:28 UTC
@moigithub thanks
CamperBot
@camperbot
Feb 03 2016 20:28 UTC
sean9 sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
Joseph Morse
@jnmorse
Feb 03 2016 20:28 UTC
@sean9 or you could just move the click even to the javascript, generally a better practice
$(document).ready(function() { var quotePool = ["You live and you learn", "I'm always hungry for knowledge", "Food is life"]; var authorPool = ["Chubaka", "Henry", "Elise"]; var quote1, quote2, quote3 = "";$('#newquote').on('click', myFunction);

function myFunction() {
var rannum = Math.floor(Math.random() * quotePool.length);
quote = quotePool[rannum] + ", " + authorPool[rannum];
$("#text").text(quote); } }); CamperBot @camperbot Feb 03 2016 20:28 UTC :star: 498 | @moigithub | http://www.freecodecamp.com/moigithub sean9 @sean9 Feb 03 2016 20:33 UTC @jnmorse i cant get that way to work @jnmorse got it thanks CamperBot @camperbot Feb 03 2016 20:34 UTC sean9 sends brownie points to @jnmorse :sparkles: :thumbsup: :sparkles: :star: 359 | @jnmorse | http://www.freecodecamp.com/jnmorse Joseph Morse @jnmorse Feb 03 2016 20:36 UTC Something that might help later, I put this together as a example for twitter buttons, http://codepen.io/jnmorse/pen/eJjYrO CompGeekGirl @LisaRamos Feb 03 2016 20:37 UTC I'm having difficulty getting my calculator to calculate, using operations, and total the numbers that I'm being impatient here. var operators = ["/", "*", "-", "+"]; var decimalAdded = false; var block = "";$(".op").click(function() {
var input = $("#inputSec").text(); input +=$(this).text();
$("#inputSec").text(input); function total() { console.log('the result of your equation is: ' + math.eval(input));$('#inputSec').text(math.eval(input));
}
});

http://codepen.io/lisaramos/pen/MKBmgm
Can anyone help me out please?

Zac Clemans
@zaclem01
Feb 03 2016 20:57 UTC
So you're trying to get it to total after each operator? Or only after the equal sign is pressed so you can chain?
sean9
@sean9
Feb 03 2016 20:58 UTC
@jnmorse ill take a look at the twitter buttons.
Zac Clemans
@zaclem01
Feb 03 2016 20:58 UTC
Sorry that was @LisaRamos
CompGeekGirl
@LisaRamos
Feb 03 2016 20:59 UTC
@zaclem01 What I'm trying to do is total everything after each operator after the equal sign is pressed so that way I can chain. How do I do that?
@unlimiworks
Feb 03 2016 20:59 UTC
http://codepen.io/UnlimiWorks/pen/GoGLRX?editors=1010 Yet another question for a potential problem
Is my twitter link right ? i hard coded most of it, and got it while i was looking at the example project, idk if that's the right wayto go about this
Clark Arnold
@clarkarnold
Feb 03 2016 21:03 UTC
I think i finally got a working pomodoro clock, would anyone mind taking a look at the functionality and my code?
@unlimiworks
Feb 03 2016 21:03 UTC
Also, when i click it, the page just becomes blank
Is that normal or is my tweeting function not working ?
Alexander Køpke
@alexanderkopke
Feb 03 2016 21:29 UTC
@clarkarnold Good job! I like it
Joseph Morse
@jnmorse
Feb 03 2016 21:31 UTC
@UnlimiWorks return \$("#twitter").attr("href", "https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=\"" + quote + " " + author + "\""); if you change that line it should work better, and you may which to add target="_blank" to your link in the html
@unlimiworks
Feb 03 2016 21:31 UTC
@jnmorse I'm kinda confused, what should i change it to ?
Joseph Morse
@jnmorse
Feb 03 2016 21:33 UTC
@UnlimiWorks the line I posted is the changed one, you currently have it inserting another quote in the string before the author, though I really recommend taking a look at the sample I posted a bit ago
@unlimiworks
Feb 03 2016 21:34 UTC
It does work upon adding target="_blank". After checking thepage with developer tools, i understand why it doesn't redirect properly (mainly because of codepen's page structure)
As for the link, i only hard coded it while reverse engineering the example project
I see. thank you
@jnmorse Thanks again, here's a brownie :)
CamperBot
@camperbot
Feb 03 2016 21:35 UTC
unlimiworks sends brownie points to @jnmorse :sparkles: :thumbsup: :sparkles:
:star: 360 | @jnmorse | http://www.freecodecamp.com/jnmorse
@unlimiworks
Feb 03 2016 21:35 UTC
I will look at the sample, much appreciated help
Clark Arnold
@clarkarnold
Feb 03 2016 21:39 UTC
@alexanderkopke Thank you! i just styled it a bit, but I have been working through it for like 4 days now so I am excited to move on.
CamperBot
@camperbot
Feb 03 2016 21:39 UTC
clarkarnold sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 458 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Clark Arnold
@clarkarnold
Feb 03 2016 21:39 UTC
CompGeekGirl
@LisaRamos
Feb 03 2016 21:46 UTC
http://codepen.io/lisaramos/pen/MKBmgm Can anyone who's done the calculator project help me calculate and total the numbers after the equal sign is pressed? In terms of chaining, whatever it is? I'm trying to do these things and I don't know what I'm doing with my code here.
Joseph Morse
@jnmorse
Feb 03 2016 21:57 UTC
@LisaRamos have your read the documentation on the mathjs lib your using and the format of the data it expects? http://mathjs.org/docs/expressions/parsing.html#eval
M1kep
@M1kep
Feb 03 2016 21:58 UTC
Hey there guys, any ideas why this isnt working? It keeps returing 021
    var hour = (theDate.getHours().length > 1) ? theDate.getHours() : ('0' + theDate.getHours());
whoops
There we go, thats the code i meant to paste
tommy
@tommygebru
Feb 03 2016 22:00 UTC
hey guys quick question I have always wondered how to Style A Line in css.....
i have an example image below, "where the lines fades at the sides" :smile:
Joseph Morse
@jnmorse
Feb 03 2016 22:00 UTC
@M1kep I think what you want is theDate.getHours() > 9 not length
M1kep
@M1kep
Feb 03 2016 22:00 UTC
hmmm
ok let me try that @jnmorse , does length not work on numbers?
tommy
@tommygebru
Feb 03 2016 22:01 UTC
Joseph Morse
@jnmorse
Feb 03 2016 22:01 UTC
@M1kep I believe its only for array, strings and maybe objects
M1kep
@M1kep
Feb 03 2016 22:01 UTC
Ohhhhh yep @jnmorse it returns undefined
THank you @jnmorse :DDD
CamperBot
@camperbot
Feb 03 2016 22:01 UTC
m1kep sends brownie points to @jnmorse :sparkles: :thumbsup: :sparkles:
:star: 361 | @jnmorse | http://www.freecodecamp.com/jnmorse
tommy
@tommygebru
Feb 03 2016 22:02 UTC
hey guys quick question I have always wondered how to Style A Line in css.....
i have an example image above, "where the lines fades at the sides" :smile:
Joseph Morse
@jnmorse
Feb 03 2016 22:05 UTC
@tommygebru https://css-tricks.com/examples/hrs/ haven't really tried it but these look promising
M1kep
@M1kep
Feb 03 2016 22:05 UTC
Send me the link to the page @tommygebru
also @jnmorse any idea why its saying the year is 116?
console.log("Starting")

function getDateAndTime() {
// Statement ? true : false
var theDate = new Date();

var month = theDate.getMonth() > 9 ? theDate.getMonth() : '0' + theDate.getMonth();
var day = theDate.getDay() > 9 ? theDate.getDay() : '0' + theDate.getDay();
var hour = theDate.getHours() > 9 ? theDate.getHours() : '0' + theDate.getHours();
var min = theDate.getMinutes() > 9 ? theDate.getMinutes() : '0' + theDate.getMinutes();
return (theDate.getYear() + "-" + month + "-" + day + " " + hour + ":" + min);
}

console.log(getDateAndTime());`
Joseph Morse
@jnmorse
Feb 03 2016 22:07 UTC
@M1kep leaving but try .getFullYear, .getYear is being deprecated
tommy
@tommygebru
Feb 03 2016 22:08 UTC
@jnmorse @M1kep thanks i keep forgetting i can google sometimes and use dev tools :wink2:
CamperBot
@camperbot
Feb 03 2016 22:08 UTC
tommygebru sends brownie points to @jnmorse and @m1kep :sparkles: :thumbsup: :sparkles:
M1kep
@M1kep
Feb 03 2016 22:08 UTC
@jnmorse oh thank you again :D
If your still here, did you just know that or?
CamperBot
@camperbot
Feb 03 2016 22:08 UTC
:star: 281 | @m1kep | http://www.freecodecamp.com/m1kep
:star: 362 | @jnmorse | http://www.freecodecamp.com/jnmorse
M1kep
@M1kep
Feb 03 2016 22:08 UTC
tommy
@tommygebru
Feb 03 2016 22:08 UTC
my precious
Joseph Morse
@jnmorse
Feb 03 2016 22:09 UTC
@M1kep well I searched for getYear causen't I couldn't remember what it did just know that I used .getFullYear for a certain reason
Nate Hutchison
@NateHutchison
Feb 03 2016 22:12 UTC
what's the difference between a library and a template? I'm trying to do the portfolio page, but I don't want to cheat. does using a template of a library and then modifying it, count? would modifying it so it looks completely different be okay?
Pawan
@pawan92
Feb 03 2016 22:23 UTC
think im gonna go through the jquery on codeacademy since im having trouble using it with these projects
Aaron Kazah
@AaronKazah
Feb 03 2016 23:04 UTC
Hey guys, do you think it's wise for me to just go straight to the zipline
Jonathan Coleman
@jondcoleman
Feb 03 2016 23:04 UTC
@NateHutchison from what I understand you can use a template as long as you give credit but you might learn more by creating it from scratch
Aaron Kazah
@AaronKazah
Feb 03 2016 23:04 UTC
like the simon game/local weather
whilst skipping the bonfires
which I find really long
Jonathan Coleman
@jondcoleman
Feb 03 2016 23:05 UTC
@AaronKazah where are you in the bonfires? Do you feel comfortable with them?
Aaron Kazah
@AaronKazah
Feb 03 2016 23:05 UTC
@jondcoleman I just don't feel motivated to do them now, I stopped after the roman numeral converter, which took me a while to do
I'm mainly into freecodecamp for the projects
Jonathan Coleman
@jondcoleman
Feb 03 2016 23:06 UTC
@AaronKazah you're welcome to try some of the ziplines
and if you feel like your js isn't up to the task go back and do the bonfires
Aaron Kazah
@AaronKazah
Feb 03 2016 23:06 UTC
ahh, that sounds sound
Jonathan Coleman
@jondcoleman
Feb 03 2016 23:06 UTC
if you're going for certification you'll need the bonfires all done though
it is a long haul getting through the bonfires
maybe you could do 1 zipline then a few more bonfires, and repeat
Aaron Kazah
@AaronKazah
Feb 03 2016 23:07 UTC
yeah, I'll have to go back to them at some point I guess
and yeah
it's the perfect amount of doing something fun and creative and doing something logically
actually never mind
I'm probably just tired
heck, I can't even go about designing the zipline
exhausted
but @jondcoleman thanks though
CamperBot
@camperbot
Feb 03 2016 23:10 UTC
:star: 490 | @jondcoleman | http://www.freecodecamp.com/jondcoleman
aaronkazah sends brownie points to @jondcoleman :sparkles: :thumbsup: :sparkles:
Aaron Kazah
@AaronKazah
Feb 03 2016 23:10 UTC
I'll try to do it later on when I get back on
Jonathan Coleman
@jondcoleman
Feb 03 2016 23:10 UTC
have a nice break!
Ghost
@ghost~563399e616b6c7089cb8e11d
Feb 03 2016 23:19 UTC
Hey guys
Is there a way to avoid the excesive use of if and else on the tic tac toe game?
Ashley
@atan77
Feb 03 2016 23:55 UTC