function inside function in python that can be used globally code example
Example 1: react must be in scope when using jsx
Must include "React" in the import line, see line 2.
Import React, { Component } from "react";
Example 2: Use the conditional operator in the checkEqual function to check if two numbers are equal or not. The function should return either "Equal" or "Not Equal".
function checkEqual(a, b) {
return a === b ? "Equal" : "Not Equal";
}