These are chat archives for FreeCodeCamp/HelpFrontEnd

3rd
Feb 2016
Mohamud Gedi
@Mogedi
Feb 03 2016 00:05
@mutantspore good idea
CompGeekGirl
@LisaRamos
Feb 03 2016 00:06
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
@LisaRamos I was having massive trouble into that, until I came across math.js
add it into your javascript
Pawan
@pawan92
Feb 03 2016 00:08
@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
@pawan92 Good stuff! I tried doing it without jQuery, but had a daytime nightmare wit that
Pawan
@pawan92
Feb 03 2016 00:11
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
@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

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 = ["/", "*", "-", "+"];
var decimalAdded = false;

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
@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
@pawan92 there's a jQuery course over at CourseCademy
@LisaRamos your $('.division').onclick(); line makes no sense
CompGeekGirl
@LisaRamos
Feb 03 2016 00:24

@Swoozeki I changed it to this instead.

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

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
perhaps you're thinking of .click() method
Pawan
@pawan92
Feb 03 2016 00:25
@Swoozeki you mean codeacedemy?
Sujit Karki
@Swoozeki
Feb 03 2016 00:25
yes
no
it's actually codecademy
CompGeekGirl
@LisaRamos
Feb 03 2016 00:27
@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
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
@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
no, I mean, in that code specifically
CompGeekGirl
@LisaRamos
Feb 03 2016 00:30
@Swoozeki I'm trying to calculate numbers in the code using operators.
Sujit Karki
@Swoozeki
Feb 03 2016 00:31
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

@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
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
the use math.js to compute the string
*then
CompGeekGirl
@LisaRamos
Feb 03 2016 00:52
@Swoozeki How do I store everything a user clicks into a string?
Sujit Karki
@Swoozeki
Feb 03 2016 00:53
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
@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
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
@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
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
@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
Booya
how you all doing?
bah I'm drunk
Alex Evans
@alex-evans
Feb 03 2016 01:57
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
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
@alcatrats it's a PITA so good luck
Kevin Elser
@CoffeeCodeKevin
Feb 03 2016 02:21
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
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
@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
@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
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
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
@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
@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
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
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
screenshot
the console after running a few times
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:36
@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
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
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
@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
@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
@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
@MattYamamoto So remove from all of the button class?
turn off rather
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:43
@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
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
zaclem01 sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
Matt Yamamoto
@MattYamamoto
Feb 03 2016 02:47
@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
:star: 903 | @mattyamamoto | http://www.freecodecamp.com/mattyamamoto
tommy
@tommygebru
Feb 03 2016 02:49
@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
@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
So only set playerTurn to true once the adding and displaying is done?
tommy
@tommygebru
Feb 03 2016 02:50
@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
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
@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
@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
@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
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
@matty22 are there hints on the zipline page?
Matt Leonard
@matty22
Feb 03 2016 02:56
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
i don't know if this is relevant but one of the first google hits @matty22
https://www.codecademy.com/courses/javascript-beginner-en-EID4t/0/1?curriculum_id=5122e6f8b2cb8a8e97000a01
Matt Leonard
@matty22
Feb 03 2016 02:59
@tommygebru I saw that, but also not sure if it's relevant.
tommy
@tommygebru
Feb 03 2016 03:00
haha im not there yet ..... :wink2:
@MattYamamoto how do you space your divs ?
Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:05
@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
This message was deleted
CamperBot
@camperbot
Feb 03 2016 03:08
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
@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
@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
tommygebru sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:warning: tommygebru already gave mattyamamoto points
Matt Yamamoto
@MattYamamoto
Feb 03 2016 03:12
@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
@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
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
@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
@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
@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
tommygebru sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:warning: tommygebru already gave mattyamamoto points
Zac Clemans
@zaclem01
Feb 03 2016 03:21
@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
@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
@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
@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
@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
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
ok I will try to pm you tomorrow :+1:
CompGeekGirl
@LisaRamos
Feb 03 2016 03:32
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
@LisaRamos any reason you want to use jquery instead of vanilla JS?
CompGeekGirl
@LisaRamos
Feb 03 2016 03:46
@atan77 I'm not familiar with vanilla JS but I was told to use math.js
Ashley
@atan77
Feb 03 2016 03:46
@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
@atan77 Do you think it would work with vanilla.js?
Ashley
@atan77
Feb 03 2016 03:52
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
@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
$ 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
@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
@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 decimalAdded = false;

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
@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
@atan77 How would I do that?
Ashley
@atan77
Feb 03 2016 04:11
@LisaRamos you already created the code for numBut, it's just like that
Eric Yohansa
@eyohansa
Feb 03 2016 04:13
@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

@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 decimalAdded = false;

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 {
     return decimalAdded = false;
  }
});

Is there something wrong with this code?

Eric Yohansa
@eyohansa
Feb 03 2016 04:45
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
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
@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
@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
@atan77 How do I use math.eval? Can you show me an example?
Eric Yohansa
@eyohansa
Feb 03 2016 05:19
@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
@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
@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
@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
@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
@LisaRamos Sure.
cannelflow
@cannelflow
Feb 03 2016 06:17
@brainyfarm thank you
CamperBot
@camperbot
Feb 03 2016 06:17
cannelflow sends brownie points to @brainyfarm :sparkles: :thumbsup: :sparkles:
:star: 1318 | @brainyfarm | http://www.freecodecamp.com/brainyfarm
Suryavamsi Teneti
@Surya97
Feb 03 2016 07:22
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="#about">About</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
@dcsan can you please help?
Suryavamsi Teneti
@Surya97
Feb 03 2016 07:37
anyone on?
蒲公英の生活
@fewspider
Feb 03 2016 07:38
@Surya97 yeah
Suryavamsi Teneti
@Surya97
Feb 03 2016 07:40
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
your data target is wrong @Surya97
蒲公英の生活
@fewspider
Feb 03 2016 07:45
@Surya97 home and about is ok
、QQuora Linkedin FreeCodeCamp display inline?
Suryavamsi Teneti
@Surya97
Feb 03 2016 07:50
so @kirbyedy what should be the data target?
@fewspider yes
kirbyedy
@kirbyedy
Feb 03 2016 07:55
also I don`t see you have bootstrap and jquery scripts
which are required in order to work
Ishan
@ishanshukla97
Feb 03 2016 07:56
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
I am not sure your problem, want all social button display vertical? @Surya97
Sandeep
@SandeepBiradar
Feb 03 2016 07:57

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
@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
+1
Ishan
@ishanshukla97
Feb 03 2016 08:00
ohkkay. thanks @mutantspore
i was getting depressed as i was not able to figure it out. :worried:
CamperBot
@camperbot
Feb 03 2016 08:00
ishanshukla97 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1078 | @mutantspore | http://www.freecodecamp.com/mutantspore
Suryavamsi Teneti
@Surya97
Feb 03 2016 08:01
@fewspider yes after reducing the size of window I need all the social button displayed in vertical
蒲公英の生活
@fewspider
Feb 03 2016 08:02
copy that
蒲公英の生活
@fewspider
Feb 03 2016 08:11
@Surya97 try col-md-number, or set a min-width of li element
Mocha
@mocha3012
Feb 03 2016 09:01
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. I`m out
Mocha
@mocha3012
Feb 03 2016 09:04
@URobert ok thanks!
CamperBot
@camperbot
Feb 03 2016 09:04
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
@mocha3012 yw
fluffystub
@RakshithNM
Feb 03 2016 09:33
<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
I guess an icon would be an img element
fluffystub
@RakshithNM
Feb 03 2016 09:45
<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
<a href="#"><i class="fa fa-facebook"></i></a>
Tomáš Kalný
@Sleepy-guy
Feb 03 2016 10:22
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
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
can i use more than one font from google fonts on my web page?
Brennan G
@BGogurt
Feb 03 2016 11:00
@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
@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
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
@BGogurt you're supposed to have all the contents in one page, according to the instructions
*checklist
Jean Louis Salbego
@jlouiss
Feb 03 2016 11:58
guys what do you think about it? http://codepen.io/JLouisS/pen/jWvOOY
Brennan G
@BGogurt
Feb 03 2016 12:01
@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
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
@jlouiss looks good
Ankit
@ankitrn
Feb 03 2016 12:08
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 Salbego
@jlouiss
Feb 03 2016 12:10
@ankitrn thanks, i'll fix it
CamperBot
@camperbot
Feb 03 2016 12:10
jlouiss sends brownie points to @ankitrn :sparkles: :thumbsup: :sparkles:
:star: 255 | @ankitrn | http://www.freecodecamp.com/ankitrn
SmikeyR
@SmikeyR
Feb 03 2016 12:36
I have finished my "Simon". I'll appreciate some feedback.
kirbyedy
@kirbyedy
Feb 03 2016 12:45
@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
thanks @BGogurt i didnt put the container part in
CamperBot
@camperbot
Feb 03 2016 12:52
durablemicron sends brownie points to @bgogurt :sparkles: :thumbsup: :sparkles:
:star: 253 | @bgogurt | http://www.freecodecamp.com/bgogurt
SmikeyR
@SmikeyR
Feb 03 2016 13:01
@kirbyedy thx. I'll do that.
CamperBot
@camperbot
Feb 03 2016 13:01
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
@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
@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
@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
@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
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
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
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
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
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
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
@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
@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
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
This message was deleted
Sujit Karki
@Swoozeki
Feb 03 2016 15:08
Time to start the Pomodoro clock
Cody Bouscaren
@codybousc
Feb 03 2016 15:09
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]])
A
@a-d-collins
Feb 03 2016 15:44
Does anyone know why the 'fire' symbol is shifting down after it has faded in?
See code below:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<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;
  border-radius: 2px;
  margin: 3px 8px 30px 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  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;
  border-radius: 2px;
  box-shadow: 0 0 50px rgba(0,0,0,0.9);
  transition: opacity 0.3s ease-in-out;
}

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

/* Fade in the pseudo-element with the bigger shadow */
#project:hover::after {
  opacity: 1;
}

.project-picture {
  diplay: block;
  height: 150px;
  width: 250px;
  border-radius: 2px 2px 0px 0px;
  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;
  border-radius: 0px 0px 2px 2px;
  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
@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
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
Oh wait haha you weren't talking to me
Maddah Anass
@unlimiworks
Feb 03 2016 16:04
Hello guys
cannelflow
@cannelflow
Feb 03 2016 16:04
anyone can help me find some reference for making Wikipedia Viewer's search box auto complete
Arnaud Casamé
@arnaudcasame
Feb 03 2016 16:04
@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
Maddah Anass
@unlimiworks
Feb 03 2016 16:04
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
Kevan Slyngstad
@Arkine
Feb 03 2016 16:09
@UnlimiWorks I can help you out
do you mean your newQuote() function?
Maddah Anass
@unlimiworks
Feb 03 2016 16:11
Yes
Kevan Slyngstad
@Arkine
Feb 03 2016 16:12
Ok just a sec while I test a few things
Maddah Anass
@unlimiworks
Feb 03 2016 16:12
Thank you, i'll be doing the same
Robert Uivarosi
@URobert
Feb 03 2016 16:12
HI guys. Quick question: do you have any idea why using position:fixed; on my container disables my buttons within ?
Kevan Slyngstad
@Arkine
Feb 03 2016 16:13
disables?
Maddah Anass
@unlimiworks
Feb 03 2016 16:13
@URobert it shouldn't
Robert Uivarosi
@URobert
Feb 03 2016 16:14
@UnlimiWorks well it does. as I uncomment that line in CSS, buton functionality returns to normal
Maddah Anass
@unlimiworks
Feb 03 2016 16:14
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
@djcase001 Thanks!
CamperBot
@camperbot
Feb 03 2016 16:15
a-d-collins sends brownie points to @djcase001 :sparkles: :thumbsup: :sparkles:
:star: 135 | @djcase001 | http://www.freecodecamp.com/djcase001
Maddah Anass
@unlimiworks
Feb 03 2016 16:16
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
@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.
Maddah Anass
@unlimiworks
Feb 03 2016 16:18
I mean position: fixed. sorry
I see
A
@a-d-collins
Feb 03 2016 16:18
@djcase001 Alright. I've fixed those typos. Unfortunately the original issue is still present
Maddah Anass
@unlimiworks
Feb 03 2016 16:19
I'm afraid i can't help, sorry. Can i check your code ?
Robert Uivarosi
@URobert
Feb 03 2016 16:22
@UnlimiWorks i fixed it with: z-index:1; on container . But thanks !
CamperBot
@camperbot
Feb 03 2016 16:22
urobert sends brownie points to @unlimiworks :sparkles: :thumbsup: :sparkles:
:star: 286 | @unlimiworks | http://www.freecodecamp.com/unlimiworks
Kevan Slyngstad
@Arkine
Feb 03 2016 16:24
@UnlimiWorks Sorry, at work so every few minutes I jump back and forth
Maddah Anass
@unlimiworks
Feb 03 2016 16:25
@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

http://codepen.io/ankitrn/pen/GoMwEo

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
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
Didn't see any issues, I think you've done well...
@ankitrn
Ankit
@ankitrn
Feb 03 2016 16:41
@JessiW Thank you :)
CamperBot
@camperbot
Feb 03 2016 16:41
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
no problem.... :+1:
@ankitrn
Kevan Slyngstad
@Arkine
Feb 03 2016 16:44
@UnlimiWorks Can't figure that one out. It calls the functions once then disables the click events on the buttons.
Maddah Anass
@unlimiworks
Feb 03 2016 16:45
@Arkine Yes, It doesn't make sense to me. Thanks ! It seems it's a jquery thing
CamperBot
@camperbot
Feb 03 2016 16:45
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
anyone still here?
Maddah Anass
@unlimiworks
Feb 03 2016 16:56
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
Okay that's alright I actually needed help with the simon game....
Maddah Anass
@unlimiworks
Feb 03 2016 16:57
I mean simon*
My bad :P
Jessi L Wasell
@JessiW
Feb 03 2016 16:57
@UnlimiWorks - thanks I'll ask there.... no problem :)
CamperBot
@camperbot
Feb 03 2016 16:57
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
@Blauelf thanks for the feedback!
CamperBot
@camperbot
Feb 03 2016 17:16
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
@a-d-collins
Cody Bouscaren
@codybousc
Feb 03 2016 17:38
@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
@a-d-collins erase the position and the display property of your .fire selector
Naveen Kumar
@naveenbanda
Feb 03 2016 18:05
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
@naveenbanda I don't understand your question. Don't you just mean images?
cannelflow
@cannelflow
Feb 03 2016 18:12
@naveenbanda add image in every container
Naveen Kumar
@naveenbanda
Feb 03 2016 18:13
yeah! I mean when we scroll down different background images comes
as in the infinito website
cannelflow
@cannelflow
Feb 03 2016 18:14
@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
thanks!!
Arnaud Casamé
@arnaudcasame
Feb 03 2016 18:20
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
wiki format
CamperBot
@camperbot
Feb 03 2016 18:33

: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

:pencil: read more about code formatting on the FCC Wiki

Dan Stockham
@DanStockham
Feb 03 2016 18:33
So what do you guys think? http://codepen.io/DanStockham/full/pgEYGw/
Joseph Morse
@jnmorse
Feb 03 2016 18:37
@DanStockham your links are incorrect, your linking to the api end point, not the channel
Dan Stockham
@DanStockham
Feb 03 2016 18:38
Yeah I just noticed that, fixing now.
Dan Stockham
@DanStockham
Feb 03 2016 18:43
it's fixed now.
or not
Joseph Morse
@jnmorse
Feb 03 2016 18:45
@DanStockham the channels returns a item url which has the link you want
Dan Stockham
@DanStockham
Feb 03 2016 18:48
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
@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
@jnmorse No problem, thanks for looking into for me.
CamperBot
@camperbot
Feb 03 2016 18:53
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
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
Great it's working now.
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:00
@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
@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
so you want i to pull the value from sessionValue element?
Russell Wheatley
@russellwheatley
Feb 03 2016 19:04
yes
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:04
ok one sec
var i = parseInt(document.getElementById('console-log').innerHTML);
Russell Wheatley
@russellwheatley
Feb 03 2016 19:06
@jondcoleman thanks man! I'll give that a try :)
CamperBot
@camperbot
Feb 03 2016 19:06
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
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
yeah, that's the one @jondcoleman
Dan Stockham
@DanStockham
Feb 03 2016 19:11
Good, The Twitch project is done for now.
Russell Wheatley
@russellwheatley
Feb 03 2016 19:13
@jondcoleman unfortunately, it's still not working
http://codepen.io/Rusticman/pen/jWYZEd?editors=1010
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:14
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
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
in your example what sets the session time?
or what should
Russell Wheatley
@russellwheatley
Feb 03 2016 19:19
The session time is set to 30 in var 1
Jonathan Coleman
@jondcoleman
Feb 03 2016 19:19
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
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
reviewing now
@Rusticman move your time var declarations inside your start function
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
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
that's just for session time. You'll probably need to do similar for other values
Russell Wheatley
@russellwheatley
Feb 03 2016 19:32
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
@Rusticman do you understand why that works?
Russell Wheatley
@russellwheatley
Feb 03 2016 19:35
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
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
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
yeah :)
no problem!
don't hesitate to ask
Russell Wheatley
@russellwheatley
Feb 03 2016 19:40
thanks mate :)
sean9
@sean9
Feb 03 2016 20:06
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
@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
im trying to get the new quote button to work
Moisés Man
@moigithub
Feb 03 2016 20:26
@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
@moigithub thanks
CamperBot
@camperbot
Feb 03 2016 20:28
sean9 sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
Joseph Morse
@jnmorse
Feb 03 2016 20:28
@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
:star: 498 | @moigithub | http://www.freecodecamp.com/moigithub
sean9
@sean9
Feb 03 2016 20:33
@jnmorse i cant get that way to work
@jnmorse got it thanks
CamperBot
@camperbot
Feb 03 2016 20:34
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
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

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
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
@jnmorse ill take a look at the twitter buttons.
Zac Clemans
@zaclem01
Feb 03 2016 20:58
Sorry that was @LisaRamos
CompGeekGirl
@LisaRamos
Feb 03 2016 20:59
@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?
Maddah Anass
@unlimiworks
Feb 03 2016 20:59
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
I think i finally got a working pomodoro clock, would anyone mind taking a look at the functionality and my code?
Maddah Anass
@unlimiworks
Feb 03 2016 21:03
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
@clarkarnold Good job! I like it
Joseph Morse
@jnmorse
Feb 03 2016 21:31
@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
Maddah Anass
@unlimiworks
Feb 03 2016 21:31
@jnmorse I'm kinda confused, what should i change it to ?
Joseph Morse
@jnmorse
Feb 03 2016 21:33
@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
Maddah Anass
@unlimiworks
Feb 03 2016 21:34
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
unlimiworks sends brownie points to @jnmorse :sparkles: :thumbsup: :sparkles:
:star: 360 | @jnmorse | http://www.freecodecamp.com/jnmorse
Maddah Anass
@unlimiworks
Feb 03 2016 21:35
I will look at the sample, much appreciated help
Clark Arnold
@clarkarnold
Feb 03 2016 21:39
@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
clarkarnold sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 458 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
CompGeekGirl
@LisaRamos
Feb 03 2016 21:46
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
@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
Michael Poutre
@M1kep
Feb 03 2016 21:58
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
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
@M1kep I think what you want is theDate.getHours() > 9 not length
Michael Poutre
@M1kep
Feb 03 2016 22:00
hmmm
ok let me try that @jnmorse , does length not work on numbers?
tommy
@tommygebru
Feb 03 2016 22:01
Screen Shot 2016-02-03 at 2.00.22 PM.png
Joseph Morse
@jnmorse
Feb 03 2016 22:01
@M1kep I believe its only for array, strings and maybe objects
Michael Poutre
@M1kep
Feb 03 2016 22:01
Ohhhhh yep @jnmorse it returns undefined
THank you @jnmorse :DDD
CamperBot
@camperbot
Feb 03 2016 22:01
m1kep sends brownie points to @jnmorse :sparkles: :thumbsup: :sparkles:
:star: 361 | @jnmorse | http://www.freecodecamp.com/jnmorse
tommy
@tommygebru
Feb 03 2016 22:02
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
@tommygebru https://css-tricks.com/examples/hrs/ haven't really tried it but these look promising
Michael Poutre
@M1kep
Feb 03 2016 22:05
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
@M1kep leaving but try .getFullYear, .getYear is being deprecated
tommy
@tommygebru
Feb 03 2016 22:08
@jnmorse @M1kep thanks i keep forgetting i can google sometimes and use dev tools :wink2:
CamperBot
@camperbot
Feb 03 2016 22:08
tommygebru sends brownie points to @jnmorse and @m1kep :sparkles: :thumbsup: :sparkles:
Michael Poutre
@M1kep
Feb 03 2016 22:08
@jnmorse oh thank you again :D
If your still here, did you just know that or?
CamperBot
@camperbot
Feb 03 2016 22:08
:star: 281 | @m1kep | http://www.freecodecamp.com/m1kep
:star: 362 | @jnmorse | http://www.freecodecamp.com/jnmorse
Michael Poutre
@M1kep
Feb 03 2016 22:08
Haha yep @tommygebru google is your lover
tommy
@tommygebru
Feb 03 2016 22:08
my precious
Joseph Morse
@jnmorse
Feb 03 2016 22:09
@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
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
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
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
@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
like the simon game/local weather
whilst skipping the bonfires
which I find really long
Jonathan Coleman
@jondcoleman
Feb 03 2016 23:05
@AaronKazah where are you in the bonfires? Do you feel comfortable with them?
Aaron Kazah
@AaronKazah
Feb 03 2016 23:05
@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
@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
ahh, that sounds sound
Jonathan Coleman
@jondcoleman
Feb 03 2016 23:06
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
yeah, I'll have to go back to them at some point I guess
and yeah
I'll follow your suggestion
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
: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
I'll try to do it later on when I get back on
Jonathan Coleman
@jondcoleman
Feb 03 2016 23:10
have a nice break!
Himad Mouhtar
@hmouhtar
Feb 03 2016 23:19
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
I had about 20 if/else statement
idietmoran
@idietmoran
Feb 03 2016 23:56
i had more :x:
Jonathan Coleman
@jondcoleman
Feb 03 2016 23:58
@hmouhtar are you attempting to make it unbeatable?