Kotlin one line solution
Code\n\nclass Solution {\n    fun scoreOfString(s: String) = s.indices.reduce { acc, i -> acc + abs(s[i] - s[i - 1]) }\n}\n
# Code\n```\nclass Solution {\n    fun scoreOfString(s: String) = s.indices.reduce { acc, i -> acc + abs(s[i] - s[i - 1]) }\n}\n```
['Kotlin']