function return / function return with two conditions

PHOTO EMBED

Wed Nov 10 2021 15:39:38 GMT+0000 (UTC)

Saved by @KarenStewart #javascript #react.js

function isCold(temperature) {
    return temperature <= 10;}

 if (isCold(10)) {
   alert("It is cold today");}
   else {
     alert("It is warm today");
   } 
//example two
function isWindy(speed, unit) {
  return speed  > 5 && unit === "metric";
};
content_copyCOPY