Created
July 1, 2016 20:28
-
-
Save artemdemo/04460dfc2d31fe99016456f9b04155a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const template = | |
`My skills: | |
<%if(this.showSkills) {%> | |
<%for(var index in this.skills) {%> | |
<a href="#"><%this.skills[index]%></a> | |
<%}%> | |
<%} else {%> | |
<p>none</p> | |
<%}%>`; | |
console.log(TemplateEngine(template, { | |
skills: ["js", "html", "css"], | |
showSkills: true | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment