I am trying to write a function in kotlin but I am not able reassign value to function parameters ,its saying val cannot be reassigned .
class WebView{
    var homepage = "https://example.com"
    fun webViewLoad(url: String, preferredOrientation: String) {
            if (url.equals("homepage")){
                url = homepage
            }
        }
    }
when I am trying to assign a value to url = homepage .it is giving me error val cannot be reassigned , I am new to kotlin ,I do not understand what is the issue , little help will be appreciated.
 
     
     
     
     
    