Velocity: "Lexical error" with JavaScript -


i'm developing web application using apache velocity , encountered lexical error said "lexical error, encountered: "(" (40), after : "".

the error brought codes included "javascript" following.

<script>   function gethelloworld() {     return "hello world!";   }   $var = window;   $var.alert(gethelloworld()); </script> 

avoiding error, tried code below , got result expected.

<script>   $var = window;   helloworld = "hello world!";   $var.alert(helloworld); </script> 

i wondered if tell me reason in detail possible.

thank you.

takahiro,


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -