No, you can't do that. ->
is not a valid identifier, and you can't define custom operators in JavaScript (if that's what you were going for). From MDN:
A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase).
Starting with JavaScript 1.5, you can use ISO 8859-1 or Unicode letters such as å and ü in identifiers. You can also use the \uXXXX Unicode escape sequences as characters in identifiers.
Of course, you can use bracket notation to define members on objects that are not valid identifiers, like this:
window['->'] = function() {
console.log("Hello");
}
But then you would have to call with this rather unwieldy syntax:
window['->']();