00:00
00:00
View Profile Noisysundae
Noisysundae — Sate Your Musical Appetite.

25, Male

Bard, Nerd

College of Winterhold

Bangkok, Thailand

Joined on 1/12/14

Level:
10
Exp Points:
918 / 1,110
Exp Rank:
54,651
Vote Power:
5.18 votes
Rank:
Scout
Global Rank:
41,159
Blams:
31
Saves:
187
B/P Bonus:
4%
Whistle:
Bronze
Trophies:
7
Supporter:
1y 9m 29d

TIL...

Posted by Noisysundae - February 1st, 2020


"...I can store a js template literal in a function to avoid early evaluation. Below is an example (inside HTML <script> tags).

foo = {
  	a: function () {
  		return `${bar}`;
  	},
	// The thing below won't work 'cause it gets evaluated ON PAGE LOAD, not when called.
	b: `${bar}`
};
Works in Chrome (V8), at least."
— The Manager

Comments