Israel is regarded in International Relations thinking as a rational defensive nuclear power, which is extremely unlikely to ever use its nukes in a first strike. Everything we know about their nuclear policy, declared or otherwise, is that they will activate their arsenal in one of only two scenarios:
a) They have been attacked first by another large-scale WMD, such as a nuclear weapon or a chem/bio attack enough to potentially wipe out a significant proportion of the population, or
b) The so-called 'Samson option', whereby if the state were close to being overrun or destroyed by invading Arab armies it would first threaten to use its nukes against the capital cities of the invading countries and, if the threat were not sufficient, follow it up with actual launches.
The fact that Israel did not even get to the stage of openly threatening the use of the Samson option in 1973, when it came very, very close to losing it all, is strong evidence in favour of its stance as a rational defensive power. In fact, both a) and b) are intended as deterrents, as both scenarios assume the near or total destruction of Israel and wouldn't be any good in saving the country if things got to that stage, but they're intended to create such an inevitably catastrophic cost to any aggressor that trying to destroy the country is no longer worth the price.
Iran's nuclear ambitions should really be seen in a wider context than just Israel though. Iran is likely pursuing nuclear weapons not in order to attack Israel (or more ridiculously, defend itself against Israel), but in order to project power unchallenged across the Middle East and thus dominate the region in a way that no other country has done for decades. This is why the traditional Sunni Arab power centres of Saudi Arabia, Jordan and Egypt are just as wary about Iran's nuclear ambitions as Israel is. I would not be surprised if at least two of those countries have begun their own covert nuclear weapons programs in order to counter the Iranian one.
a) They have been attacked first by another large-scale WMD, such as a nuclear weapon or a chem/bio attack enough to potentially wipe out a significant proportion of the population, or
b) The so-called 'Samson option', whereby if the state were close to being overrun or destroyed by invading Arab armies it would first threaten to use its nukes against the capital cities of the invading countries and, if the threat were not sufficient, follow it up with actual launches.
The fact that Israel did not even get to the stage of openly threatening the use of the Samson option in 1973, when it came very, very close to losing it all, is strong evidence in favour of its stance as a rational defensive power. In fact, both a) and b) are intended as deterrents, as both scenarios assume the near or total destruction of Israel and wouldn't be any good in saving the country if things got to that stage, but they're intended to create such an inevitably catastrophic cost to any aggressor that trying to destroy the country is no longer worth the price.
Iran's nuclear ambitions should really be seen in a wider context than just Israel though. Iran is likely pursuing nuclear weapons not in order to attack Israel (or more ridiculously, defend itself against Israel), but in order to project power unchallenged across the Middle East and thus dominate the region in a way that no other country has done for decades. This is why the traditional Sunni Arab power centres of Saudi Arabia, Jordan and Egypt are just as wary about Iran's nuclear ambitions as Israel is. I would not be surprised if at least two of those countries have begun their own covert nuclear weapons programs in order to counter the Iranian one.