how to check whether the given input is in a string javascript code example Example: js test if string if (typeof string === 'string') { /* code */ };