What is the best way to find out the type of a variable in Solidity? (something like typeof in JS)
Solidity is statically typed.
Solidity is a statically typed language, which means that the type of each variable (state and local) needs to be specified (or at least known - see Type Deduction below) at compile-time. Solidity provides several elementary types which can be combined to form complex types.