Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Xavier Velez
@JonSnow08
@Pezz18 so that call you're using wont return anything
Andrew Perrin
@Pezz18
ok, i see, i've switched to an alternative...ap-api.com
in the code pen, you can see this commented out,
Xavier Velez
@JonSnow08
@Pezz18 I tried going to ap-api.com but documentation wont load
@Pezz18 your geolocation isn't working?
Andrew Perrin
@Pezz18
Xavier Velez
@JonSnow08
ah ip-api not ap lol
okay cool
Andrew Perrin
@Pezz18
when i first completed the challenge a few months ago, it all worked fine, yet it no longer is, i queried it on here, and some people suggested that google chrome no longer support geo.location for non https requests..
Anthony
@EpocVargVici
Could someone tell me a different way on doing this? Challenge Check for Palindromes
function palindrome(str) {
  // Good luck!

  var strReplaced = str.replace(/[\s+.,\/#!$%\^&\*;:{}=\-_`~()]/g,"");
  var strLowerCase = strReplaced.toLowerCase();
  var strSplitted = strLowerCase.split("");
  var strReversed = strSplitted.reverse();
  var strJoined = strReversed.join('');


  if(strLowerCase === strJoined) {
    return true;
  } else {
    return false;
  }
}



palindrome("_eye");
Mikail Bayram
@mikail1998
@EpocVargVici is yout code wotking ?
working**
your*
Anthony
@EpocVargVici
It has been accepted as correct yes
Mikail Bayram
@mikail1998
@EpocVargVici so you just want to see another way of doing it?
Anthony
@EpocVargVici
Yes
Andrew Perrin
@Pezz18
@JonSnow08 so do you see what i mean now?
Xavier Velez
@JonSnow08
@Pezz18 yup
i had to do the exact same thing
Mikail Bayram
@mikail1998
@EpocVargVici I would like to help, you but I have done it the same way hahahaha
Anthony
@EpocVargVici
@mikail1998 Alrigthy then ^^
Xavier Velez
@JonSnow08

$.get('http://ip-api.com/json', function(loc){
lat = loc.lat;
long = loc.lon ;
});
@Pezz18
Andrew Perrin
@Pezz18
@JonSnow08 ok, so i understand how that should work, but i can see that my pen is still not showing any data,, and when i do an alert on the lat variable, it returns "undefined"
Xavier Velez
@JonSnow08
@Pezz18 link codepen again plz
Joel Abees
@JoelAbees
@demmak Yeah sure.
Sjy
@sanj1591
var myStr = "FirstLine \n \SecondLine\ \r ThirdLine"; // Change this line
Need Help :confused:
Christopher
@subtlefluids01
hi guys can someone check what's wrong with my code on falsy bouner challenge
Norvin Burrus
@ndburrus
@sanj1591
ok, we need to take the given string, here:
"FirstLine newline backslash SecondLine backslash carriage-return ThirdLine" (ignore the spacing) and replace the appropriate text (bold words) with the escape coding (use the Code/Output chart)...
@subtlefluids01 code?
Christopher
@subtlefluids01

function isFalsy(n){
return n !== null && n !== undefined && n !== false && n !== 0 && n !== "" && n!== isNaN(true);

}
function bouncer(arr) {
// Don't show a false ID to this bouncer.

return arr.filter(isFalsy);
}

bouncer([7, "ate", "",false, null, 9, null, undefined, NaN]);

it didnt work out for isNaN(true), i tried changing the value for isNaN() parameter but never worked out well
Norvin Burrus
@ndburrus
@subtlefluids01 did you consider using the boolean object?
Andrew Perrin
@Pezz18
@JonSnow08 hey, how are you getting on!? hope my code isnt too confusing!
Christopher
@subtlefluids01
@ndburrus I googled about it, but i thought arr.filter is easier ?
Xavier Velez
@JonSnow08
@Pezz18 no not at all just reading through right now
stonefmagiecurata
@stonefmagiecurata
@subtlefluids01 'n!== isNaN(true)' is bad
@subtlefluids01 !isNaN(n)
Christopher
@subtlefluids01
@stonefmagiecurata what's the correct way ? tell me bro
ah okay
stonefmagiecurata
@stonefmagiecurata
@subtlefluids01 you have to pass the param to isNaN
@subtlefluids01 and that will return true or false
Christopher
@subtlefluids01
@stonefmagiecurata oh thanks dude!
CamperBot
@camperbot
subtlefluids01 sends brownie points to @stonefmagiecurata :sparkles: :thumbsup: :sparkles:
:cookie: 273 | @stonefmagiecurata |http://www.freecodecamp.com/stonefmagiecurata
Norvin Burrus
@ndburrus

@subtlefluids01

The Boolean object represents two values, either "true" or "false". If value parameter is omitted or is 0, -0, null, false, NaN, undefined, or the empty string (""), the object has an initial value of false.

Christopher
@subtlefluids01
@ndburrus got it solved, thanks mate!
CamperBot
@camperbot
subtlefluids01 sends brownie points to @ndburrus :sparkles: :thumbsup: :sparkles: