21 Behold, I say unto you that whoso believeth in Christ, doubting nothing, whatsoever he shall ask the Father in the name of Christ it shall be granted him; and this promise is unto all, even unto the ends of the earth.
If we trust in Christ, what we ask of the Father in righteousness will be given to us. And this promise is to everyone.
25 And whosoever shall believe in my name, doubting nothing, unto him will I confirm all my words, even unto the ends of the earth.
Exercising faith in Jesus will lead to testimony of the truth, and he will confirm his words to us himself.
27 O then despise not, and wonder not, but hearken unto the words of the Lord, and ask the Father in the name of Jesus for what things soever ye shall stand in need. Doubt not, but be believing, and begin as in times of old, and come unto the Lord with all your heart, and work out your own salvation with fear and trembling before him.
The continuous exercise of faith and trust in the Lord will lead to salvation.
To have doubts is perhaps the prelude to faith. The person struggling with doubt learns to exercise trust and prove the truth. We just have to have the courage to keep doubting until we receive the witness that all seekers of truth can obtain. Jesus will confirm all of his words to those who persist in faith.