Hey -- When I have this javascript in my file and try to execute a function defined after it, the function is never executed. When I remove this piece, it works fine. This leads me to believe that there is something wrong with this bit. Is this a correct assumption? And do you see anything wrong with this? Thanks
Pulsar
function findOffset(alphabet, ch)
{
var findOffset = alphabet.indexOf(ch) - 1
If (findOffset == -1) {
return -5
} else {
return findOffset
}
}
The part that gives me trouble is the If...Else statement. I threw the rest in to give you some context. Thx.
Pulsar
function findOffset(alphabet, ch)
{
var findOffset = alphabet.indexOf(ch) - 1
If (findOffset == -1) {
return -5
} else {
return findOffset
}
}
The part that gives me trouble is the If...Else statement. I threw the rest in to give you some context. Thx.