What's a Random Variable?

I just found the most intuitive definition of a random variable I’ve seen so far: here and here. In short, a random variable is a function that maps each element in a sample space to a real number. A subset of the sample space in which every element in the subset maps to the same real number value, is an event. In other words, a random variable defines events in a sample space.