Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
otomer authored Nov 12, 2019
1 parent 3709fdb commit 616695c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,18 @@ function(value){
}
```
**Method 4:**
You can query the constructor name:
```javascript
function isArray(value) {
return value.constructor.name === "Array";
}

```
## Question 37. Best way to detect reference values of any type in JavaScript ?
In Javascript Object are called as reference type, Any value other then primitive is definitely a reference type. There are several built-in reference type such as **Object**, **Array**, **Function**, **Date**, **null** and **Error**.
Expand Down

0 comments on commit 616695c

Please sign in to comment.