DD2480-G9 / metrics-graphics

A library optimized for concise and principled data graphics and layouts.
http://metricsgraphicsjs.org
Mozilla Public License 2.0
0 stars 0 forks source link

Requirement: Use template substitutions in strings #8

Closed lobax closed 6 years ago

lobax commented 6 years ago

Template substitutions offer a nice syntactic sugar in order to avoid concating strings. Example:

function authorize(user, action) {
  if (!user.hasPrivilege(action)) {
    throw new Error(
      `User ${user.name} is not authorized to do ${action}.`);
  }
}

They also add support for multiline strings that will look the way they are formated (eliminating the need to use special characters like \n, \t etc), making the code more readable.

See this for more information.

RickardBjorklund commented 6 years ago

No longer needed since assignment 3 is done!