There is a problem.
Suppose there is a variable var my = 33 .
There is a code:
var aloha = { id: my, type: 'mytype', lvalue: my, }; It is necessary that in the browser instead of my displayed 33 .
I tried different ways and experimented, but nothing happens.
When I have a variable in php , I just insert <?=$my;?> And that's it.
But when the value in the variable js , I have such a problem, please help.
What result do I want to get:
In order for the body of the document to have id: 33 when viewing the code in the browser, it should be like in the image below, only instead of my its value:
It is necessary to get it like this when viewing the code:
At the request of the respondents - the original code:
var google_tag_params = { dynx_itemid: idsGoogleTag, dynx_pagetype: 'conversion', dynx_totalvalue: totalGoogleTag, }; The idsGoogleTag and totalGoogleTag store the values I need.


myinstead of output33- Grundy