An Interest In:
Web News this Week
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
- April 12, 2024
- April 11, 2024
May 26, 2015 08:00 am GMT
Original Link: http://feedproxy.google.com/~r/Noupe/~3/RerRYEXPfLo/understanding-ecmascript-6-template-strings-2-91959.html
Understanding ECMAScript 6: Template Strings (#2)
Welcome to the second part of my series about ECMAScript 6! One of my favorite new web standards Microsoft Edge, the new browser rendering engine we’re creating at Microsoft, is the extensive support it offers for ECMAScript 6. So I wrote this series to walk you through some of the cool things you can do with ECMAScript 6 when writing large applications for the web. In the first installment, I covered Class and Inheritance. In this article, I’ll focus on template strings based on my personal experience creating embedded expressions. Resolving the Line Return Problem When working on babylon.js, I have to deal with shaders code which can be seen, for the sake of comprehension, like a big bunch of text (which looks like C). You can find an example here. The problem when dealing with long-sized text in JavaScript is the line return. How many times did you write this kind of thing? 1 2 3 4 5 6 7 var myTooLongString = "A long time ago, in a galaxy far," + "far away...." + "It is a period of civil war." + "Rebel spaceships, striking" + "from a hidden base, have won" + "their first victory against" + […]Original Link: http://feedproxy.google.com/~r/Noupe/~3/RerRYEXPfLo/understanding-ecmascript-6-template-strings-2-91959.html
Share this article:
Tweet
View Full Article
Noupe
Noupe passionately delivers stylish and dynamic news for designers and web-developers across the globe on all subjects of designMore About this Source Visit Noupe