JavaScript Syntax and Punctuation Meanings Question

I would like to know what certain syntax’s mean that I’ve run across but don’t understand what the do. Examples

hit.rigidbody || hit.rigidbody.isKinematic — || separating

!hit — exclamation sign before function

hit : RaycastHit — : separating

hit == 2 —double equal signs

&& —double “and” signs

Is there anyone who can tell me the purpose of each one of these?

This is basic programming syntax, you might want to read some tutorials on programming in general.

| is ‘or’ and a single is bit-wise, where || (double) is logical

! is ‘not’

: separating is the type. first thing is variable name, thing after : is the type of variable that is

&& means ‘and’ (logical). a single & is ‘bitwise and’

== means ‘is equal to’ for comparisongs. a single = means ‘assign this to’

Now, google ‘bitwise’ and ‘logical’ and ‘boolean’