javascript function call with variable
function abc() {
alert('test');
}
var funcName = 'abc';
window[funcName]();// Define your function
function sayHello(msg){
console.log("Hello, " + msg);
}
// Call it
sayHello("Norris");
// outputs:
// Hello, Norris
Also in JavaScript:
- get platform node
- electron send message from renderer to main
- defer parsing of javascript wordpress
- javascript boolean
- Removing duplicates in an Array of Objects
- javascript getelementbyid
- array chunk javascript
- javascript array to csv string
- js tab in textarea
- nodejs zlib
- get common values from two arrays javascript
- react clear form input field
- jquery on click return link url
- json parse
- how to declare a variable js
- JSSEProvider()
- react redux counter tutorial
- localstorage javascript
- jquery get custom attribute
- how to check if object is undefined in javascript
- how to check the extension of a file in javascript
- React get method
- svelte reactive async
- js C:\fakepath