To perform the flame test, a sample of the substance being tested is held in a flame using a nichrome wire or a platinum loop. The color of the flame is observed carefully. If the flame shows a bright yellow color, it indicates the presence of sodium ions, which suggests the presence of sodium chloride impurity.
It's important to note that the flame test is a qualitative test and can detect the presence of sodium ions, but it cannot determine the exact concentration or quantity of sodium chloride present. Additionally, the presence of other substances in the sample may also affect the color of the flame, so care must be taken to interpret the results accurately.