John strongly links assurance and prayer in this verse. Assurance here is not a technical confidence that our souls are safe, but a confidence before the living God when we come before him with our urgent petitions.
The believer measures every motion of his soul by this test: ‘Is it pleasing in his sight?’, for we do not live to ourselves alone but to God.
God is persuadable. This is a mystery, but our earnest prayers play a part in his eternal purposes and must not be left out. Even though God’s plan is fixed from before the foundation of the world, we may say this was brought about through my prayers.
Is it safe for Scripture to promise us that whatever we ask, we will receive from God? Yes, because those who live to please God will desire things that are consistent with his will. This promise gives us the freedom to let our desires range across all the good things that we might ask God for, and to ask with expectation that he will hear us. This is the freedom of beloved children.