I have a script that looks like this:
var test = {
something: function(m){ alert('m'); }
}
And I’d like to pass in a parameter (in this case the message to alert. I’ve tried the following but clearly I’m missing something:
test.something('This is my message...');
Ideas?
You are alerting a string literal. Remove the quote characters to make it a variable