{"id":815,"date":"2022-08-30T15:07:38","date_gmt":"2022-08-30T15:07:38","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/ejs-template-function-inside-function-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:07:38","modified_gmt":"2022-08-30T15:07:38","slug":"ejs-template-function-inside-function-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/ejs-template-function-inside-function-collection-of-common-programming-errors\/","title":{"rendered":"ejs template function inside function-Collection of common programming errors"},"content":{"rendered":"<p>Is there a way for ejs template to call a function inside another function? For example I am trying to do like this:<\/p>\n<pre><code>\n        \n\n\n\n\n\n    \n        \n         \n        \n\n        ]]&gt;\n        \n    \n\n\n<\/code><\/pre>\n<p>But it says that graphs are undefined&#8230;<\/p>\n<ol>\n<li>\n<p>Your code is saying that &#8220;graphs&#8221; (with an &#8220;s&#8221;) is undefined and not &#8220;graph&#8221;, correct? Where are you defining the graphs array? Otherwise, the code looks fine.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:47:12. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Is there a way for ejs template to call a function inside another function? For example I am trying to do like this: ]]&gt; But it says that graphs are undefined&#8230; Your code is saying that &#8220;graphs&#8221; (with an &#8220;s&#8221;) is undefined and not &#8220;graph&#8221;, correct? Where are you defining the graphs array? Otherwise, the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-815","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=815"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/815\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}