how to check if a string is a value in an object javascript code example Example: js test if string if (typeof string === 'string') { /* code */ };