JSFiddle - React, Tailwind, and code Playground

by Shah Danial

JavaScript

var myCountryName= 
/* change 'country name' below */
'israel'
/* change 'country name' above */;

alert(verifyCountryInEarthPlanet(myCountryName.trim()));

function getTrueCountryName(setCountryName){
  if(setCountryName.toLowerCase() == 'israel'){
    var countryLand = 'Palestine';
  } else {
    var countryLand = setCountryName;
  }
  return countryLand.toLowerCase();
}

function verifyCountryInEarthPlanet(setCountryName){
  if( setCountryName.toLowerCase() == getTrueCountryName(setCountryName) ){
    var iamNotTrump = setCountryName+' 200 success. '+setCountryName+' is 1 of country in this World';
  } else {
    var iamNotTrump = setCountryName+' 404 not found in real earth maps. Is it at Pluto? is it NAZI who\'s bring you to '+getTrueCountryName(setCountryName)+'?';
  }
  return iamNotTrump;
}