crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

Function to check character exists or not in string
Question Posted on 27 Aug 2011Home >> JavaScript >> JavaScript Questions >> Function to check character exists or not in string

function checkChar(str)
{
  //function to check the character exists or not in string
  var constraints='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz, ';
  var constraints_length=constraints.length;
  var str_length=str.length;
  for(var counter=0;counter<.str_length;counter++)
  {
     var flag=false;
     var targetchar=str.charAt(counter);
     for(var pointer=0;pointer<.constraints_length;pointer++)
     {
        if(targetchar==constraints.charAt(pointer))
        {
         flag=true;
         break;
        }
     }
     if(flag==false)
     {
      return false;
     }
  }
  return true;
}
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

regular expression for credit card like VISA, MASTER, AMEX

How to remove item from dropdownlist in Javascript

Different Data Types in Javascript in 2015?

syntax to get dropdownlist text in javascript

The snippet that has to be used to check if “a” is not equal to “null” is _________






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap