What is the workaround for isupper() Python function in JavaScript?

I know how to detect, if a string contains uppercase letters only in Python. But how to make a workaround for that in JavaScript? The current string is: "foO" ( Workaround this: "foO".isupper() )

You are viewing a single comment. View All

if a string was uppercased, if you uppercased it again, it would be the same, so: x.toUpperCase() == x will tell you.