If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

You have numerous errors in your function! First it ain't gonna check all of the elements of an array. Second you have used an assignment operator (=) in your if statement instead of equality operator (==). Third instead of converting an array element to lowercase thus making your function case insensitive you are converting pattern argument...

This is the code you're looking for but obviously you have a lot to learn so head to the job... (friendly advice), no offense

The question is what do you do when the tutor in class puts you on the spot for using code you have not yet been taught or to explain your code.

The point of going to uni is to not party but attend class and learn. Making a prejudgment I know but this is my impression of whats really going on because this pretty rudimentary stuff that I self taught with no school tutoring, I hale from the days when the only computer in school was in the computer studies class and was the size of a filing cabinet and all the processing power of a calculator and nothing existed in programming other than BASIC or ASM.

Even now I get stumped and have to ask questions, its not a learn and know everything language, even if its 20 odd or more years old, the full extent of JavaScript can not be fully grasped until you have wandered off the track a bit and find functions developed by others and you're "Wow, I didn't know you could do that" criteria.

So do yourself a favor, don't panic, a bit of research will take you on your way and don't expect your home work to be done for you because you will never learn by that method.

The question is what do you do when the tutor in class puts you on the spot for using code you have not yet been taught or to explain your code.

The point of going to uni is to not party but attend class and learn. Making a prejudgment I know but this is my impression of whats really going on because this pretty rudimentary stuff that I self taught with no school tutoring, I hale from the days when the only computer in school was in the computer studies class and was the size of a filing cabinet and all the processing power of a calculator and nothing existed in programming other than BASIC or ASM.

Even now I get stumped and have to ask questions, its not a learn and know everything language, even if its 20 odd or more years old, the full extent of JavaScript can not be fully grasped until you have wandered off the track a bit and find functions developed by others and you're "Wow, I didn't know you could do that" criteria.

So do yourself a favor, don't panic, a bit of research will take you on your way and don't expect your home work to be done for you because you will never learn by that method.

I appreciate your concern but my 'tutor' will not ask how/where I got my code from because he knows his students will do anything they can to pass especially when they are given coursework they have not been taught. How is someone that has never done JavaScript before meant to do the things I've posted? Over 70% of people have not even started because they don't understand and no one will help so forgive me for going the extra mile to pass.