Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 27 19:46
    @mstellaluna banned @zhonghuacx
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:09
    thecodingaviator commented #31179
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:07
    thecodingaviator commented #31182
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator commented #31190
  • Apr 01 18:05
    thecodingaviator commented #31157
  • Apr 01 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 18:04
    thecodingaviator closed #31157
  • Apr 01 18:04
    thecodingaviator closed #33788
  • Apr 01 18:04
    thecodingaviator commented #33788
  • Apr 01 18:02
    thecodingaviator closed #31059
Kyle Holm
@thekholm80
so
typeof "" // => 'string'
typeof undefined // => 'undefined'
Boby Y.
@Boobsled
kyle, Im not getting any results...could you look at my code?
Kyle Holm
@thekholm80
sure
Boby Y.
@Boobsled
function abTest(a, b) {
  // Only change code below this line
  switch(a,b){
  case(b<0):
  case(a<0):
  return undefined;



  }
  // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}

// Change values below to test your code
abTest(2,2);
Kyle Holm
@thekholm80
are you sure a switch is best there?
could just do if (a < 0 || b < 0) return undefined
Boby Y.
@Boobsled
why isnt switch the best there?
Kyle Holm
@thekholm80
because you're evaluating in the case statement
the evaluation should take place in the switch statement
at least, to the best of my knowledge
Boby Y.
@Boobsled
Okay. Thank you @thekholm80
CamperBot
@camperbot
boobsled sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1382 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
:+1:
Boby Y.
@Boobsled
what do you do with these points by the way?
Kyle Holm
@thekholm80
i'm saving up to buy a car
kidding, they're just for fun
Boby Y.
@Boobsled
Hahaha =))
Balaji
@balajichari31
@adeluccar : Hey!! Are you from Lucca, Italy??
Joseph
@revisualize
@Boobsled If you were tasked to write code for that challenge in an interview with me and you wrote a switch statement instead of an if. I would think you didn't understand what the functionality of a switch is.
Alberto De Lucca
@adeluccar
No @balajichari31 - Venezuela 😉
Boby Y.
@Boobsled
@revisualize You're right...there's no alternative cases that would have to befined by a statement...else if makes more sense. Good thing Im starting to learn'
Viktor Tiutiun
@vittorioVT
hello everybody
Balaji
@balajichari31
@adeluccar : my bad :) , is there a Lucca in Venezuela too???
Viktor Tiutiun
@vittorioVT
@thekholm80 your game is super! Is it Redux and React? Or only Redux?
Boby Y.
@Boobsled
does anyone know any useful links I could read upon so I can do challenge 200?
It has some new stuff...
Timothy Javins
@timjavins
If I knew what challenge 200 was, perhaps I can suggest something.
I think I have to dig in my memory to solve it actually
Timothy Javins
@timjavins
Do you have the function mapped out in your head? Do you know what to do?
In other words, can you solve it with the idea in your head or on scratch paper? If no, then we can talk about that. If yes, then it's a matter of coding it up and you'll just have to refresh your chops a little.
Claudio Restifo
@Marmiz
@thekholm80 if it's only front end logic (ie no server) you can deploy it to surge.sh
I <3 surge
Andrei Bratu
@andreibratu26
Guys help please
When i try to move the about me upwards
it cuts my photo too
How to stop that from happening?
wonder
@wonder2991
@andreibratu26 not sure what you mean. can you explain?
Claudio Restifo
@Marmiz
@andreibratu26 well, the about me h2 has a top:20px to it. You can set it to 0 to have it align with the img div
Timothy Javins
@timjavins
Also, @andreibratu26, it's rendering poorly in Edge. It looks great in Chrome. You may want to add the appropriate -ms versions of your style tags to fix that.
Timothy Javins
@timjavins
You can also use negative numbers. Like, -20px.
Tiago Correia
@tiagocorreiaalmeida
https://codepen.io/tiagocorreia/pen/QMWPQB need help on 2 things about css, first How can I avoid the p tag that shows keys pressed to grow more than it own size, and second why when I use AC or I use CE unthil I clear everything about the css goes crazy?:D
Timothy Javins
@timjavins
@tiagocorreiaalmeida Your CSS goes crazy when there is no value in the calculator. You have the CE button popping the last-appended value. Once it's popped them all, the screen is blank and the CSS goes awry. The same thing happens with you hit the AC button: it clears the screen and the CSS gets ugly.
Change the AC action to entrys = ["0"] so it acts like a real calculator and that will fix the AC action.
Tiago Correia
@tiagocorreiaalmeida
tought about it thanks sir :)
Timothy Javins
@timjavins
Modify your CE function so that it will display a value of 0 instead of null once all entries are popped and it will be fixed there, too.
Tiago Correia
@tiagocorreiaalmeida
  if(this.getAttribute("action") === "AC"){
    entrys = ["0"]
    updateScreen();

  }

 //checks if the value clicked is ce if it is then will remove by every click the last value inserted in the array returns nothing when array is equal to empty
  else if(this.getAttribute("action") === "CE"){
    if(entrys.length > 1){
    entrys.pop();
    updateScreen();
    }else{
      entrys = ["0"]
    updateScreen();
    }
  }
this?
as only one problerm after that the value is starting with a zero xd