Write a function called checkValueType that takes a parameter value of type Any and determines its value type by returning "AnyVal" or "AnyRef". For simplicity, you have to handle only Int, Double, String types of values.
Unified types
Check a type
Report a typo
Sample Input 1:
1 2.0 textSample Output 1:
AnyVal
AnyVal
AnyRefWrite a program in Scala 3
def checkValueType(values: List[Any]): List[String] =
??? // Write your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.