JSFiddle - React, Tailwind, and code Playground
by Newman4088
HTML
<p>
How old are you?
<input type='text' name='age_input' id="age_input" />
</p>
<a href="a" id="my_button"></a>
<p id='#their_real_age'>
</p>
JavaScript
function some_function(some_input) {
var some_value = 10 + (some_input = 1);
return some_value;
}
//var the_result_of_my_function = some_function(4);
//console.log(the_result_of_my_function);
$("#my_button").click(function () {
var their_age = $("#age_input").val();
var their_real_age = some_function(their_age);
$("#thier_real_age").html("You lied! Your real age is: + "their_real_age);
});