Ey,
Last day(s) i m starting to code a bit with javascript, but i keep on getting the same problem. so i hope somebody can help me with this:
where i am looking for : a fuction that returns true when the filename ends with ".set". ( its for a (team) setup database).
my try:
when i debug my function its working until the if(Typestring == '.set')
he just totally skips that part. (i cant find out why).
hope somebody can help me with the basics of javascript.
because its kinda new for me
Last day(s) i m starting to code a bit with javascript, but i keep on getting the same problem. so i hope somebody can help me with this:
where i am looking for : a fuction that returns true when the filename ends with ".set". ( its for a (team) setup database).
my try:
function getfiletype(Name){
var Typestring='';
var Lastdot =0;
for(i=0; i<Name.length;i++){
if(Name[i] =='.'){
Lastdot = i;
}
}
for(i=Lastdot; i<Name.length; i++){
Typestring += Name[i];
}
if(Typestring == '.set'){
return true;
}
else{
return false;
}
}
when i debug my function its working until the if(Typestring == '.set')
he just totally skips that part. (i cant find out why).
hope somebody can help me with the basics of javascript.
because its kinda new for me