Which characters can be used for naming a JavaScript variable?  I want to create a small "extension library" for my non-JavaScript users here at work (who all seem to be squeamish when it comes to the language).  I love how jQuery and Proto...
In Perl I can repeat a character multiple times using the syntax:  $a = "a" x 10; // results in "aaaaaaaaaa"   Is there a simple way to accomplish this in Javascript? I can obviously use a function, but I was wondering if there was...
I am so close to getting this, but it just isn't right.  All I would like to do is remove the character r from a string.  The problem is, there is more than one instance of r in the string. However, it is always the character at index 4 (so the...
I am extracting a character in a Javascript string with:  var first = str.charAt(0);   and I would like to check whether it is a letter. Strangely, it does not seem like such functionality exists in Javascript. At least I cannot find it.  How can I...
I have a textarea and when I click in it I want to move the caret to the last character so Something[caret]  function moveCaret(){      // Move caret to the last character }   <textarea onclick="moveCaret();">      Something </text...
I just need to allow a user to enter the following characters in the textinput:  [email protected]#$%^*_|  <form action="http://www.cknuckles.com/cgi/echo.cgi" method="get" name="logOn">   User Name:<br />   <input ty...
I try to match/get all repetitions in a string. This is what I've done so far:  var str = 'abcabc123123'; var REPEATED_CHARS_REGEX = /(.).*\1/gi;  console.log( str.match(REPEATED_CHARS_REGEX) ); // => ['abca', '1231']...
I have an array containing strings with special unicode characters:  var a = [     ["a", 33],       ["h\u016B", 44],     ["s\u00EF", 51],     ... ];   When I loop over this array:  for (i=0;i<a.length;i++) {     document.wr...
I want to count the number of words in a passage that contains both English and Chinese. For English, it's simple. Each word is a word. For Chinese, we count each character as a word. Therefore, ??? is three words here.   So for example, "I a...
I need to find out the names for Unicode characters when the user enters the number for it. An example would be to enter 0041 and get given "Latin Capital Letter A" as the result....

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.