JSFiddle - React, Tailwind, and code Playground

by senica

JavaScript

function func_name(argument_1, argument_2) {
    //My code
}

var result = "Whatever";

result = 4;

function square(a) {
    return Math.pow(a,2);
    
    window.alert("This never runs");
}

function my_alert() {
    window.alert("12 squared is: " + square(12));
}

var x = square(3) + square(2);

//my_alert();
window.setTimeout(my_alert, 1000);


function answerTelephone(telephone) {
  var successfullyAnswered = telephone.answer();
    
  if (!successfullyAnswered) {
        alert("Couldn't Answer the Phone!");
  }
    
  return successfullyAnswered;
};