This is false. Nitrogen and oxygen are both gases. Therefore, they will do the most common type of bonding: covalent. In a covalent bond, electrons are shared between two molecules. An ionic bond is when one molecule takes an electron from the other, and that draws the other molecule closer. Ionic bonds are mainly formed between metals - so nickel and cobalt could form an ionic bond. Nitrogen and oxygen are gases and therefore cannot make an ionic bond.
This is a simple explanation of the two bonds. There are much deeper reasons for why this is false, but for a tenth grader, this would be sufficient enough to answer a multiple choice question on a test. There is always the internet if you want to know more.