drupal 8 node has field

JavaScript
$entity->hasField('abc')
Source

Also in JavaScript: