Answers for "javascript function to check whether an 'input' is a string or not."

0

how to check whether input is string or not

num = input("Enter your number ")

print("\n")
if num.isdigit():
    print("User input is Number ")
else:
    print("User input is string ")
Posted by: Guest on December-08-2020
0

how to check if input is string javascript

let value = 'abc';
if (typeof value === 'string') {
  // it is a string
}
Posted by: Guest on April-05-2022

Code answers related to "javascript function to check whether an 'input' is a string or not."

Python Answers by Framework

Browse Popular Code Answers by Language