How to use an IF statement in node.twig In node.twig (output for articles) I want to use the value of boolean content type field like this, but do not know how to realize this in drupal 8.

if boolean content type is true {
  &lt;div class="text"&gt;
   {{ content.body }}
  &lt;/div&gt;
else {
  &lt;div class="img"&gt;
   {{ content.img }}
  &lt;/div&gt;
}
According the Twig If documentation, you would do it like this:

{% if content.field_boolean == true %}
  &lt;div class="text"&gt;
   {{ content.body }}
  &lt;/div&gt;
{% else %}
  &lt;div class="img"&gt;
   {{ content.field_image }}
  &lt;/div&gt;
{% endif %}


You need to use content.[machine name] you can find the machine name of you fields in Manage Display of your content type. 

From my example. change content.field_boolean to the machine name of your boolean field. If your boolean field is called "cool" then replace it with content.field_cool

Remember to clear/flush the cache to see changes.