When people say that Jesus was tempted by the devil, it is not really correct.
The Lord Jesus was tested by the devil, because the Holy Spirit lead Him out to show that He was indeed the Messiah.
He is our high priest. Hebrews 4:15 says For we do not have a high priest\xa0who is unable to empathize with our weaknesses, but we have one who has been tempted in every way, just as we are\u2014yet he did not sin.
The lord Jesus testing proves that He was God.
Because there was nothing in him to draw Him away unto sin.
You will notice that the lord Jesus used Scripture to defeat the devil. So we also should use scripture, so that we will have victory over the devil.
But you must study the scripture so that you will be equipped to defeat the devils schemes.