Calling and invoking a function in WebStorm