I tried this in my code and also in the Chrome console and it's not doing what I want. Do you know why it's not working?
let r = 'd';
r == 'e' ? console.log('itisE') :
r == 'd' ? console.log('itisD') : console.log('nothing');
Chrome's console prints "undefined", it doesn't execute the function calls. Neither does my code (in my code, it's for UI changes of various buttons).