Edited strings in console.log in if conditional