> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/js/val/type/type-functions/isfunction.md).

# isFunction()

[JS](/web/js.md) ⟩ [values](/web/js/val.md) ⟩ [custom functions](/web/js/val/type/type-functions.md) ⟩ isFunction()

{% hint style="success" %}
check if value is a [Function](/web/js/val/builtin/func.md).
{% endhint %}

{% tabs %}
{% tab title="💾 程式" %}

* replit：[typeName() (v.2)](https://replit.com/@pegasusroe/typeName-from-MDN#index.js)
* require：  [baseTypeName()](/web/js/val/type/name/base-type-name.md)
* (to use it, copy and paste from 📁 module file： [typeName()](/web/js/val/type/name/typename.md))

```javascript
// ⭐️ check if value is a function
// - require: baseTypeName()
function isFunction(value) {
    return baseTypeName(value) === "Function";
}
```

{% endtab %}

{% tab title="💈範例" %}

* 👉 see： [isClass()](/web/js/val/type/type-functions/isclass.md)
  {% endtab %}

{% tab title="⬇️ 應用" %}

* [isClass()](/web/js/val/type/type-functions/isclass.md) - check if value is a [class](/web/js/val/class.md).
  {% endtab %}
  {% endtabs %}
