> For the complete documentation index, see [llms.txt](https://soufatn.gitbook.io/rxjs-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soufatn.gitbook.io/rxjs-book/summary/notification/notification_properties/hasvalue.md).

# hasValue

Determines whether the Notification has a value. Returns `true` for OnNext Notifications, and `false` for OnError and OnCompleted Notifications.

### Returns

*(Bool)*: Returns `true` for OnNext Notifications, and `false` for OnError and OnCompleted Notifications.

### [Example](http://jsbin.com/cicixi/3/edit?js,console)

```javascript
var onNext = Rx.Notification.createOnNext(42);
console.log(onNext.hasValue);

// => true

var onCompleted = Rx.Notification.createOnCompleted();
console.log(onCompleted.hasValue);

// => false
```

### Example
