Hello Mohanraj N.
inputcheck variable used in the elseif block is not available here (i.e not defined) because it was declared with a let keyword in the if block.
NOTE:
letis block scoped . In simple terms variables declaredletwithin a block{ }are only accessible within the block.
I hope you find this useful. Cheers!!!