I want to change value of textbox to -999, if it is having a value of NaN. I have written some code but it is not working, please suggest me what I need to change in this.
if($('input[name="tt10"]').val() === NaN) {
$('input[name="tt10"]').val('-999');
}
<input name='tt10' value='NaN'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>