4 ms·if (!myString) { } Good old JavaScript.by whipoodle 9y agoif (!myString) { } Good old JavaScript.rusk 9y agoyeah I think actually python and ruby do this as well …whipoodle 9y agoPretty sure an empty string is truthy in Ruby.rusk 9y agoYes you're right. Ruby actually supports the comparison the author seeks [0]: > nil.to_s == "" > "".to_s == "" [0] https://stackoverflow.com/a/9915384 https://stackoverflow.com/a/9915384whipoodle 9y agoI think it might be more idiomatic, and more in the direction of what the author seeks, to check `my_string.present?` which is false for nil and empty string.rusk 9y agoThat's what they are. Pick one and invert the logic.