On Friday 27 September 2002 08:18, MikkelFJ wrote:
> >     window.caption = files[current_item] || "Untitled"
>
> See that's what I mean - everything I can think of in Ruby has
> already been implemented.
> Obviously I have far too few opportunities to write Ruby code, but
> when I do, I get all these enlightning experiences :-)
>
> Mikkel

window.caption = files[current_item]  # nil
window.caption ||= "Untitled" # set to 'Untitled' if nil

:)