let password = 'cat dog'
if (password.length => 6){
if ( password.indexOf (' ') !==-1 ) {
console.log ('Password cannot include spaces!')
}else {
console.log('Valid Password')
}
I’m having trouble grasping the concept of the nested conditional code where it checks if there’s spaces in the password,
( password.indexOf (’ ') !==-1 )
The the use of the non equality operator and what its actually doing here is what I think is tripping me up.