• 0 Posts
  • 44 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle


  • Imagine, if you will. A world where string reverse changes the character codes of the string.

    What beauty, what wonder would such a world have?

    Destruction and despair. Developers unsure why their programs don’t respond correctly. Ships run aground on islands already overcrowded with those who were shipwrecked before. Signal antennas pointed towards the sun with it’s constant noise. Spacecraft whose exhaust melt to slag populated cities as people briefly scream their final terrors of pain and suffering.

    This, is a world we should not want to live in. A world you can only find, in the Twilight Zone.

















  • So in JavaScript there’s the assignment

    =
    

    and the comparator is

    ==
    

    Since there’s no types JS will do implicit conversion before comparison when using == in a case like this

    if(false == '0'){
        //this is true
    }
    

    But with === it doesn’t. It means literally compare these

    if(false === '0'){
        //this is false
    }else{
        //so this will execute instead 
    }
    

    But this, however, will

    var someState = false;
     if(someState === false){
        //this is true
    }