About 84,900 results
Open links in new tab
  1. Passing string parameter in JavaScript function - Stack Overflow

    Aug 12, 2015 · In your JavaScript, grab the button using its ID, assign the function to the button's click event, and use the function to display the button's data-name attribute.

  2. javascript - How to reverse a string without using any built-in ...

    I want to reverse a string without using any inbuilt function, and I want it to change the original string itself but it doesn't work well. The language is Javascript.

  3. Is there a way to create a function from a string with javascript ...

    Oct 4, 2011 · If you have a function expression that is in string form and you want to make it a function, then you need to include a return statement in the string you pass to new Function.

  4. javascript - Converting a string with spaces into camel case - Stack ...

    Mar 19, 2019 · How can I convert a string into camel case using javascript regex? EquipmentClass name or Equipment className or equipment class name or Equipment …

  5. How to turn a String into a JavaScript function call?

    In javascript, object members can be access with a string the same way you do with an array. Assuming your function is declared in the global scope, it become a function in the window …

  6. How do I write an extension method in JavaScript?

    214 JavaScript doesn't have an exact analogue for C#'s extension methods. JavaScript and C# are quite different languages. The nearest similar thing is to modify the prototype object of all …

  7. How do I make the first letter of a string uppercase in JavaScript?

    Jun 22, 2009 · How do I make the first character of a string uppercase if it's a letter, but not change the case of any of the other letters? For example: "this is a test" → "This is a test" ...

  8. Evaluating a string as a mathematical expression in JavaScript

    How do I parse and evaluate a mathematical expression in a string (e.g. '1+1') without invoking eval (string) to yield its numerical value?

  9. What is the difference between string primitives and String objects …

    JavaScript automatically converts primitives to String objects, so that it's possible to use String object methods for primitive strings. In contexts where a method is to be invoked on a primitive …

  10. Optimum way to compare strings in JavaScript? - Stack Overflow

    I am trying to optimize a function which does binary search of strings in JavaScript. Binary search requires you to know whether the key is == the pivot or < the pivot. But this requires two s...