Reputation: 2841
When I am reading some codes of Javascript, I stop at this below:
object1.A = {
...
port:"<%= @port1 %>"
...
}
Is that some kind of special string format of Javascript like Ruby "#{port1}" which can convert to the specific value automaticlly ?
Upvotes: 0
Views: 48
Reputation: 5676
object1.A = {
...
port:"<%= @port1 %>"
...
}
Has not really to do with javascript itself. I guess it is some kind of templating (language).
Maybe it has to do with serverside templating like ASP
, or JSP
or the like. On the other hand you have template strings in Backbone which use such a notation.
But the @
-sign suggests something ruby-like (cf. ERB).
Upvotes: 0
Reputation: 6012
No, this is nothing special in a JavaScript context, but might however be processed and subsituted on the server side by another scripting language, or by a client side templating library.
Upvotes: 3