Q:

Getting the first 3 letters of the value entered from Input

I have two inputs. I want to show the first 3 letters of the value entered from the first input in the input below. How can I do ? 
<input type="text" name="firstinput" required placeholder="First Input"><br><br>
<input type="text" name="secondinput" required placeholder="Second Input">

A:

Use the substring() js function for this
Using pure javascript:

document.getElementById("firstinput").addEventListener("keyup", function(){
   var name = document.getElementById("firstinput").value;
   name = name.substring(0,3);
   document.getElementById("secondinput").value = name;
});
<input type="text" id="firstinput" name="firstinput" required placeholder="First Input"><br><br>
<input type="text" id="secondinput" name="secondinput" required placeholder="Second Input">
  

Using jquery:

$("#firstinput").keyup(function(){
  var fname = $("#firstinput").val().substring(0, 3);
  $("#secondinput").val(fname); 
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type="text" id="firstinput" name="firstinput" required placeholder="First Input"><br><br>
<input type="text" id="secondinput" name="secondinput" required placeholder="Second Input">
  

