Usually I would expect a String.contains() method, but there doesn't seem to be one.   What is a reasonable way to check for this?...
Is there a way to retrieve the (starting) character positions inside a string of the results of a regex match() in Javascript?...
I'm looking for a fuzzy search JavaScript library to filter an array. I've tried using fuzzyset.js and fuse.js, but the results are terrible (there are demos you can try on the linked pages).  After doing some reading on Levenshtein distanc...
How can I place many pseudo selectors inside the native Javascript querySelectorAll()?  Example: I want to search for an element with an id that starts with [id^=starting]  and ends with [id$=ending]. (Couldn't find existing question so making my...
I am trying to make a small random quizz generator, first array has the questions and they are randomly displayed (when page is loaded or when page is refreshed), the second array has the answers.  Now, when the user typed an answer, if that answer i...
I need this string:  var x = 'Hi ${name}! How are you? ${name}, you are old! ${name} share with ${other} how do u ${feel}!'   I need to know using Regex how much distinct ${ANY_THING} exists. In example above i expect 3: ${name}, ${other}, ${...
Is there an equivalent in JavaScript to the C function strncmp?  strncmp takes two string arguments and an integer length argument.  It would compare the two strings for up to length chars and determine if they were equal as far as length went.    Do...
How can I simplify below code? How can I get rid of the if statements? I want to highlight some lines in ajax response. Right now I have two strings to compare = two ifs. This number will increase so I am thinking of doing this some other way - using...
I have a ton of variables to work with here, with information going back and forth between a form in HTML. The variables need to be global so that they can work across a variety of functions. So here's one sample of the list:  var charDex = 0; va...
I have a large DB having > 20,000 rows. I have two tables songs and albums:  table songs contains songid, albumid, songname and table albums contains albumid, albumname  Currently when user searches for a song I give results instantly as soon as h...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.