Quick question: 1) When calling a Kotlin function ...
# announcements
m
Quick question: 1) When calling a Kotlin function from Javascript: it works well like this in a HTML
⁠⁠⁠⁠<button onclick="SampleProject.testMethod()" href="#">SUBMIT</button>
2) But when calling a Kotlin function with a parameter from Javascript: Like this
⁠⁠⁠⁠<button onclick="SampleProject.testMethodWithParam(25)" href="#">SUBMIT</button>
I get the following error for that line
TypeError: SampleProject.testMethodWithParam is not a function
Main.kt is:
Copy code
public fun testMethod(){
    println("testMethod triggered")
}

public fun testMethodWithParam(something: Int){
    println("testMethodWithParam triggered")
}
Could somebody please guide me on what is wrong here?