I have this below method but when I use variable inside this method it detects it as a string (gives a NaN error). These Variable are chap1, chap2, chap3, chap4 and chap5. How do I fix this.
Thanks
var chap1 = 0;
var chap2 = 104;
var chap3 = 235;
var chap4 = 309;
var chap5 = 406;
ChapterMarkerPlayer.insert({
container: 'captions-session-player',
videoId: youtubeId + '?wmode=opaque&theme=light&autohide=0&modestbranding=1&rel=0&autoplay=0',
width: 469,
chapters: {
chap1: '<span style="display: inline-block; width: 88%;">Chapter 1: Evaluating our industry’s track record on innovation</span>',
chap2: '<span style="display: inline-block; width: 88%;">Chapter 2: Can asset managers learn from top innovators in other industries?</span>',
chap3: '<span style="display: inline-block; width: 88%;">Chapter 3: How does multi-asset investing align with investor needs?</span>',
chap4: '<span style="display: inline-block; width: 88%;">Chapter 4: Can investment industry innovators improve investor trust? </span>',
chap5: '<span style="display: inline-block; width: 88%;">Chapter 5: Will regulators help to improve trust in our industry?</span>'
}
});