diff --git a/guide/english/javascript/typeof/index.md b/guide/english/javascript/typeof/index.md index a2f16f8718..2e2af4b6b8 100644 --- a/guide/english/javascript/typeof/index.md +++ b/guide/english/javascript/typeof/index.md @@ -25,6 +25,8 @@ x = 'string'; console.log(typeof x) // string x = { key: 'value' }; console.log(typeof x) // object +x = true; +console.log(type of x) // boolean ``` This can be useful for checking the type of a variable in a function and continuing as appropriate.