JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" name="age" value="25" />

<button type="button" id="attr">Get `value` attribute</button>

<button type="button" id="prop">Get `value` property</button>

JavaScript

var input = $('input:first');

$('button').click(function() {
   var method = this.id;
   alert(method + ' -> "' + input[method]('value') + '"'); 
});