JSFiddle - React, Tailwind, and code Playground

by Göran Andersson

JavaScript

function capturePhoto() {
    alert(1);
}

var photo = "yes";

if (photo=="yes") {

    capturePhoto();

}

else {
  //do nothing
};