how to check has string js code example Example: js test if string if (typeof string === 'string') { /* code */ };