loop.last of a certain block type What are I doing wrong here?

I'm setting block types 'stripCustom' and 'stripShowroom' to 'stripBlock'

{% set stripBlock = entry.contentImage.type(['stripCustom', 'stripShowroom']) %}


Then in a loop checking if 'stripBlock' is last and the current block is last but one.

&lt;div class="section {% if loop.last == stripBlock and loop.revindex0 == 1 %}gutter-bottom--double{% endif %}"&gt;
....
&lt;/div&gt;
To test if the current block is the last in the loop and of a certain type, you could do something like:

{% if loop.last and block.type == "yourBlockType" %}yes{% endif %}


or shorthand

{{ loop.last and block.type == "yourBlockType" ? 'yes' : 'no' }}


In the above example replace 'no' with '' to output nothing. It's  just there if you want to output something in case of false

or even shorter

{{ loop.last and block.type == "yourBlockType" ? 'yes' }}