3 ms·
You really should not use this ever in any situation, but for historical reasons[1], if they are the only thing on the line you can use HTML comments in JavaScr
by empyrical 5y ago
You really should not use this ever in any situation, but for historical reasons[1], if they are the only thing on the line you can use HTML comments in JavaScript like so:
function foo() {
<!--- returns true ---->
return true;
}
This works at least in Chrome and V8, not sure about Firefox.
[1] https://stackoverflow.com/a/1508005/1888964 https://stackoverflow.com/a/1508005/1888964
- lhorie 5y agoSemi-related: https://twitter.com/LeoHorie/status/930515291183898624 https://twitter.com/LeoHorie/status/930515291183898624