Programming and Intuition

Javascript:

console.log("A" > "a") //Intuition says true

Swift:

print("A">"a") //Intuition says true

What is the expected result? My mental about English alphabets were Upper case letters were bigger than Lower case letters. Hence I expected the result to be true.

Result is:

false

Why is my intuition wrong?

My mental model of alphabets was correct in Real-world but the Programming languages' model about alphabets are different than mine.

Index of a in Unicode table - 0061

Index of A in Unicode table - 0041

Screenshot 2021-04-11 at 10.13.13 PM.png

An interesting perspective I read about Intuition and programming is here

References:

unicode.org/charts/PDF/U0100.pdf

unicode-table.com/en/#basic-latin

javascript.info/comparison