1. What is the difference between let and apply scope functions?
The let function passes the object as the lambda parameter accessible via it and returns the lambda's result, useful for transformations or null-safety with safe call operator. The apply function makes the object available as this inside the lambda and returns the object itself, ideal for object configuration. Use let when you want to transform an object or execute code with non-null values like person question mark dot let open curly print it dot name close curly. Use apply for object initialization like Person open paren close paren dot apply open curly name equals John close curly. Both are scope functions that help reduce temporary variables and make code more concise, but choosing between them depends on whether you need the lambda result or the original object returned.