Question: I saw this code and I'm scratching my head trying to decide how it works.

```
<SCRIPT LANGUAGE=javascript> 

     function SpeechMikeControl::SPMEventButton(lDeviceID, EventId) {
        alert("lDeviceID=" + lDeviceID + ", EventId=" + EventId);
     }

</SCRIPT>

```

double colon? This is from using a philips speech mike from a web page.

Any idea what this double colon means? It seems like a syntax error to me but it works! (at least in IE).

Answer: 
Pretty sure it's a syntax error
The question may not be a duplicate of [What does ‘::’ (double colon) do in javascript?](https://stackoverflow.com/questions/1520360/what-does-double-colon-do-in-javascript), but the answer is: it is a syntax error.

In the following:

```
function SpeechMikeControl::SPMEventButton(lDeviceID, EventId) {

```

the keyword *function* in the global context at the start of an expression indicates a function declaration. Following **must** be an identifier that is the function name. After the name must be an opening grouping operator '(', formal parameter list and closing grouping operator ')'. So between *function* and *()* can only be a single identifier of allowable characters (that isn't a reserved word, or future reserved word, but that isn't an issue here).

The ":" (colon) character is a punctuator and can not appear in an identifier. So it *must* cause a syntax error if the code is treated as javascript.

Perhaps IE has an extension to the language, I don't know ECMAScript well enough to know if that is permissible, but I'd expect not since it **will** break other implementations.