<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ajax</title>
</head>
<body>
<button onclick="ass.ss() ">Execute</button>
<script>
var ass = function ss() { alert("hello") };
//Solve How can I execute the ss() method
</script>
</body>
</html>
Just use the variable name plus parentheses to access it. You can use ass() directly