How to check in Twig file whether node has a field? In my twig file i try to override the field. In the {% if %} clause I need to check whether a field has particular value, if yes then assign the value as a class. 

{% for item in items %}
  {% if node.language.value == "English"  %}
    {% set example_classes = 'english' %}
   {% else %}
    {% set example_classes = node.language.value %}
  {% endif %}
  &lt;div{{ attributes.addClass('field', field_name, example_classes) }}&gt;
    {{ item.content }}
  &lt;/div&gt;
{% endfor %}


the line {% if node.language.value == "English"  %} brings nothing, how can I get the value of the node's field_language in twig file?

In the field.html.twig a list of available variables is specified: 

Available variables:
* - attributes: HTML attributes for the containing element.
* - label_hidden: Whether to show the field label or not.
* - title_attributes: HTML attributes for the title.
* - label: The label for the field.
* - multiple: TRUE if a field can contain multiple items.
* - items: List of all the field items. Each item contains:
*   - attributes: List of HTML attributes for each item.
*   - content: The field item's content.
* - entity_type: The entity type to which the field belongs.
* - field_name: The name of the field.
* - field_type: The type of the field.
* - label_display: The display settings for the label.
I'm a friend of template pre-processing, in order to keep presentation logic separated from (advanced) field processing.

Therefore, I suggest a hook_preprocess_HOOK() implementation in your theme's *.theme file and outline this approach:

/**
 * Implements hook_preprocess_HOOK() for nodes.
 */
mytheme_preprocess_node(array &amp;$variables) {
  $node = $variables['node'];
  $example_class = '';
  if (
    $node-&gt;hasField('field_language')
    &amp;&amp; !$node-&gt;field_language-&gt;isEmpty()
  ) {
    $variables['example_class'] = strtolower($node-&gt;field_language-&gt;value);
  }
  $variables['example_class'] = $example_class;
}


So you could access the newly added template variable {{ example_class }} within your node template:

{% for item in items %}
  {%
    set field_classes = [
      'field',
      field_name,
      example_class,
    ]
  %}
  &lt;div{{ attributes.addClass(field_classes) }}&gt;
    {{ item.content }}
  &lt;/div&gt;
{% endfor %}


If you'd like to stick to just altering your template, you can also access all fields of a node entity within its templates by using the {{ node }} variable.

Keep in mind, that unrendered/preprocessed fields of the original entity usually are FieldItemLists. So you'll access an array of field item instances keyed by their delta:

{% if node.field_language and node.field_language[0].value == 'English' %}
...
{% endif %}


The {{ dump() }} Twig function can help you to debug your available values.