What does the "!" character do? (JavaScript)

what does the exclamation mark (!) does when placed before something (in a if, for example)? I can't find out...

It means "not".

The 'exclamation mark' (!) is often referred to as the 'logical NOT operator' (Javascript reference page).

Some examples...

These two have the same outcome, but most people prefer to write it the second way:

if ( !(variable == 10) )  // if the inner statement is not true
if ( variable != 10 )     // if the variable does not equal 10

It's also useful for 'flipping' bools - i.e. setting it to false if it's true, and setting it to true if it's false:

boolean = !boolean;

Hope this helps. Let me know if you need further explanation.