Fill html element with text bassed on input with javascript : The code right now works only to fill another input field. But I need it to fill regular paragraph and not another input field. How can I do it?

    # here is html
    <input type="text" class="first" placeholder="type here">
    <input type="text" class="second" placeholder="here it is the reuslt">

    # here is js
    $(".first").on('keydown',function(){
        $(".second").val($(this).val());
    });