js check variable if string or object code example Example: js test if string if (typeof string === 'string') { /* code */ };