have you tried writing code right in to firebug console ? to write/learn javascript it's best tool i know.
edit:
for html/css there's a lot of tools that might help (actually i sits on windows but there's no special app that might be useful), on mac there's coda or espresso which is typical (and not typical) wysywig tool and have live preview mode, as far as i know coda offers a cheap support of javascript.
for javascript firebug in firefox / developer tool in safari, chrome.