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
Elbert Cortez
@trip16661
or to be more clear to you
.fail(error => console.log(error.responseJSON.message));
edit: responseJSON instead of response (typo)
Sorin Ruse
@sorinr
@designBuildShipSoftware sorry. it worked for me but looking at your code i saw you are using getJSON. I've used $.ajax with success and error. try the way @trip16661 told you. it should work
Elbert Cortez
@trip16661
@sorinr its basically and essentially the same
its just syntactically different but both work the same way
either way i would recomend he do it on my way because thats basically how promises look like so he gets familiarized
Elbert Cortez
@trip16661
@designBuildShipSoftware since you never came back I assume it worked xDD you are welcome xD
Sorin Ruse
@sorinr
@trip16661 i know that but if he wants to use getJSON he should use the .fail. this is wat i was trying to say
Elbert Cortez
@trip16661
does anyone need help?
Mikail Bayram
@mikail1998
@trip16661 I do actually need help
http://codepen.io/mikail1998/pen/pbQjVN Before I added this else if ($("#result").text().slice(-1)==="/"||""||"+"||"-"&&clickedButton==="/"||""||"+"||"-"){
console.log('Math operation button clicked');
} the code worked when i added this calculator didnt do nothing
wiki help how to add code in chat
CamperBot
@camperbot
no wiki entry for: help how to add code in chat
Moisés Man
@moigithub
else if ($("#result").text().slice(-1)==="/"||"*"||"+"||"-"&&clickedButton==="/"||"*"||"+"||"-"){
u need to use backticks
ur if conditional expression have wrong syntax
u should do something like var ==="something" || var === "somethingElse"
Mikail Bayram
@mikail1998
@moigithub backticks is not the problem
Moisés Man
@moigithub
backticks used to post formatted code on this chat (it wont solve ur code problem ) :)
Sorin Ruse
@sorinr
@mikail1998 to a lot of divs you forget to complete the col-xs-? and when you hover for example "/"
Roman Ferrante
@Stormin-Norman
hello
my tribute page is done
lemme know what you guys think
Mikail Bayram
@mikail1998
@sorinr i dont get you
Sorin Ruse
@sorinr
@mikail1998 take a look at: <div class='col-md-3 col-xs-' id='division'> <p>/</p>
Mikail Bayram
@mikail1998
@sorinr yeah i see but it didnt sort my problem out
Sorin Ruse
@sorinr
@mikail1998 i was not talking about the sort problem but the UI
Moisés Man
@moigithub

on ur if code above.. as i said above.. u doing something like
if(myVar === 1||2||3||4 ) { ... } <-- wrong
u should do something like
if(myVar === 1||myVar === 2|| myVar === 3||myVar === 4){ .... }

@mikail1998

Hong
@designBuildShipSoftware
@trip16661 @sorinr Hi I'm back from nursing my baby. Thank you both! I will try them out :)
CamperBot
@camperbot
designbuildshipsoftware sends brownie points to @trip16661 and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 464 | @trip16661 |http://www.freecodecamp.com/trip16661
:cookie: 677 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
@mikail1998 when you use CE (clear entry) means that only the last entry is cleared. you are clearing all previous entries that is more of a C on a calculator and it means clear all
Moisés Man
@moigithub

another way to do (what above code does) is using arrays methods... ie...

var myValues = [1,2,3,4];
if( myValues.includes( myVar ) ) {  ..... }

@mikail1998

Mikail Bayram
@mikail1998
@moigithub i will now try your code
i mean your way
Hong
@designBuildShipSoftware
@trip16661 @sorinr The .fail() method worked for me. .fail didn't fail.
Hong
@designBuildShipSoftware
Mikail Bayram
@mikail1998
@moigithub again nothing
but thank you for trying to help
@moigithub thank you
CamperBot
@camperbot
mikail1998 sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 1960 | @moigithub |http://www.freecodecamp.com/moigithub
Mikail Bayram
@mikail1998
Moisés Man
@moigithub
@mikail1998 well.. the syntax still wrong u didnt fixed....
to test ur code.. which IF block reach.. (flow execution) add DIFFErents console.log messages to each block... not the same text
if u still Not sure.. why ur block dont execute.. then evaluate each part of ur if condition expression separatedly above..
ie: console.log($("#result").text());
do u understand the concepts of "truthy" / "falsy".. ?
var test = false;
if (test) { console.log("meeee");}
else { console.log("booo"); }

Which message do u think it will log on console ???

Moisés Man
@moigithub
false, undefined, "" (empty string), 0, null
are falsy values... everything else are truthy
@mikail1998
soo check this condition... is correct ??
var b=1;
var a = 1;
if (a || b < 0) {
   console.log("a or b are less than 0");
} else { 
     console.log("zzzzzz")  ;
}
kennyq94
@kennyq94
hey everyone is this the correct code to get navigator to work on your browser, I wonder why it is not prompting me to use my location... pls help
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(location, error);
} else {
  alert("Geolocation not supported");
}

function error() {
  alert("Sorry you are in outer space");
}
encount
@encount
@kennyq94 I does not work in chrome