diff --git a/doc/api/addons.md b/doc/api/addons.md index 1db1e5ecaf9d5b..bc3cf2d41f56a0 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -246,7 +246,7 @@ napi_value Method(napi_env env, napi_callback_info args) { napi_value greeting; napi_status status; - status = napi_create_string_utf8(env, "hello", 6, &greeting); + status = napi_create_string_utf8(env, "hello", NAPI_AUTO_LENGTH, &greeting); if (status != napi_ok) return nullptr; return greeting; }