Glad it worked. Yes, you need to update your cache (or use F5 to reload the page) every time you change em_javascript.js
Also, I think your function definition should be:
'udfchoose' => array('udf_choose', 'UDFchoose', $this->gT('Returns a value from a list based on the value of the first argument'), 'number udfchoose(index, arg1, arg2, ... argN)', '', -2)
Instead of -3, since it looks like you only take one mandatory argument.
As per the
documentation on adding functions, it is worth adding test cases to Expression Manager to verify that your new function is working as desired.
That also looks like a helpful function. If you are using GitHub, you should consider opening a pull request so the team could have the option of incorporating that function into the base. The is a current work-around, which is to use nested if() statements, but that can get cumbersome; and extensions to udfchoose() could take a delimited syntax for the second argument so that users could implement more generic array lookup functionality (e.g. by having udfchoose() split the second parameter on the delimiter and then return the desired sub-element).