JSFiddle - React, Tailwind, and code Playground

by thudfactor

JavaScript

function one() {
    if(two != undefined) {
        alert(two());
    } else {
        alert("Function two does not yet exist.");   
    }
    
    if(three != undefined) {
        alert(three());
    } else {
        alert("Function three does not yet exist.");   
    }
    
    function two() {
        return "Inside function two.";
    } 
    
    var three = function() {
        return "Inside function three.";   
    } 

    if(three != undefined) {
        alert(three());
    } else {
        alert("Function three does not yet exist.");   
    }
    
    alert("Function two is named: " + two.name);
    alert("Function three is named: " + three.name);
    
}

one();