---
title: "Daniel Cobo (@cobo) | Hashnode"
description: "👨‍💻 Full-stack developer |🍦Vanilla code advocate. Read the latest articles by Daniel Cobo on Hashnode."
url: "https://hashnode.com/@cobo"
---

@cobo

# Daniel Cobo

@cobo · Joined April 2021

👨‍💻 Full-stack developer |🍦Vanilla code advocate

[Website](https://danielcobo.com/)

### [Bulletproof type checks in JavaScript](https://danielcobo.com/bulletproof-type-checks-in-javascript?utm_source=hashnode&utm_medium=feed)

Using typeof To check what type is a variable you would most likely use the typeof function. You can even skip the parenthesis (typeof someVariable is same as typeof(someVariable)). typeof works great for: strings numbers (not if checking integer vs...

3 min read · [danielcobo.com](https://danielcobo.com/bulletproof-type-checks-in-javascript?utm_source=hashnode&utm_medium=feed)

[May 17, 2021](https://hashnode.com/posts/bulletproof-type-checks-in-javascript/60a2e0c8eeabf031a1a954e5)

### [Get the first and last moment of a day in Javascript](https://danielcobo.com/get-the-first-and-last-moment-of-a-day-in-javascript?utm_source=hashnode&utm_medium=feed)

Ready-to-use functions to get the first and last millisecond of a day using a few lines of vanilla JavaScript.

2 min read · [danielcobo.com](https://danielcobo.com/get-the-first-and-last-moment-of-a-day-in-javascript?utm_source=hashnode&utm_medium=feed)

[May 10, 2021](https://hashnode.com/posts/get-the-first-and-last-moment-of-a-day-in-javascript/609980cf1ea29f2c341e3746)

### [Check if the user is from EU with JavaScript](https://danielcobo.com/check-if-the-user-is-from-eu-with-javascript?utm_source=hashnode&utm_medium=feed)

Obviously your best guess is to ask the user. That being said, we generally want to avoid interrupting the user. Websites and apps are (or at least should be) about what the user's needs not ours. That being said, given the many legislation requirem...

3 min read · [danielcobo.com](https://danielcobo.com/check-if-the-user-is-from-eu-with-javascript?utm_source=hashnode&utm_medium=feed)

[May 3, 2021](https://hashnode.com/posts/check-if-the-user-is-from-eu-with-javascript/60906760953edb0234b82b04)

### [Get user's preferred languages with JavaScript](https://danielcobo.com/get-users-preferred-languages-with-javascript?utm_source=hashnode&utm_medium=feed)

Skip to solution If you have different language settings in your website or application wouldn't it be great if you could automatically set the language the user prefers? Doing so may be easer than you think. All you have to do is use navigator.langu...

1 min read · [danielcobo.com](https://danielcobo.com/get-users-preferred-languages-with-javascript?utm_source=hashnode&utm_medium=feed)

[Apr 26, 2021](https://hashnode.com/posts/get-users-preferred-languages-with-javascript/60870c3e0ab1e40574b9983f)

### [Get location by IP with JavaScript](https://danielcobo.com/get-location-by-ip-with-javascript?utm_source=hashnode&utm_medium=feed)

Skip to solution. Problem Knowing your customer location can help you tailor their experience. Other times you may want to check for this information to compile statistics or comply with regulations. What's the best way to get location data? One way...

4 min read · [danielcobo.com](https://danielcobo.com/get-location-by-ip-with-javascript?utm_source=hashnode&utm_medium=feed)

[Apr 19, 2021](https://hashnode.com/posts/get-location-by-ip-with-javascript/607dd9caeb2bd30d2d229efe)
