hettlage (136) [Avatar] Offline
#1
I know this is nit-picking (and a matter of taste), but it might be worth using a template literal when setting this.innerHTML.
430326 (10) [Avatar] Offline
#2
That's not nitpicking at all! So here's my problem...

I'm writing a chapter on template literals right now, using ES2015 modules for proper separation of concern (controller logic and HTML markup view), getting into lit-html, hyperhtml. I'm covering it all. Since template literals are a newer ES2015 concept, I wanted to properly introduce them as a concept not necessarily everyone knows. The problem is that until then, I'm not necessarily sure the best strategy. Do I use backticks for all my strings and not really explain it? Do I tease and say a proper explanation is coming later? I opted for a third strategy of using the old way even if it is ugly, but it's something everyone is familiar with, and then when we get to the chapter I'm currently working on you get that night and day comparison of normal strings and template literals.

What do you think? Thanks for the suggestion!
hettlage (136) [Avatar] Offline
#3
There might be a fourth option: use the old way, but point out that there is a new way and that it will be explained in Chapter N. smilie
430326 (10) [Avatar] Offline
#4
Ha! I think I dig that. That's actually what I meant by the tease option. I need to do some revisions soon on those chapters, I'll keep that in mind. thanks a bunch!