E
Eric
Hello,
I'm having problems with the apostrophe character when building a
Javascript array.
I've come up with two different ways to fix the problem. I wondered
if any one had any input as to which approach would be "best
practices" and why.
Approach 1:
var aMyArray = new Array();
aMyArray[aMyArray.length] = new Array('Person's name.',
'',
'False',
'',
'True');
Approach 2:
var aMyArray = new Array();
aMyArray[aMyArray.length] = new Array('Person\'s name.',
'',
'False',
'',
'True');
Thanks,
Eric
I'm having problems with the apostrophe character when building a
Javascript array.
I've come up with two different ways to fix the problem. I wondered
if any one had any input as to which approach would be "best
practices" and why.
Approach 1:
var aMyArray = new Array();
aMyArray[aMyArray.length] = new Array('Person's name.',
'',
'False',
'',
'True');
Approach 2:
var aMyArray = new Array();
aMyArray[aMyArray.length] = new Array('Person\'s name.',
'',
'False',
'',
'True');
Thanks,
Eric