Why am I getting "substring undefined" as an error?

Is there something I’m missing in how I wrote my code to create a blog with a DB? My blog already has posts read from a DB so I don’t get why they aren’t displayed.

TypeError: C:\Users\user\Desktop\projects\Cornell_Style_Note_Taker\Blog-With-Database-final\views\home.ejs:13
11|


12|

13| <%=post.content.substring(0, 100) + " …"%>
14|
15| Read More
16|

Cannot read property ‘substring’ of undefined

welcome back ayanda

which blog you use or do you mean you create your own blog app and which programing language you use

Thanks, @justsomeone i am focusing o specializing with js so node. I managed to figure this issue out.

I needed value to be rendered by ejs to fix it… i am now just struggling with making the search functionality happen but i think i need to stick to my study path and revise the basics again haha…

you very welcome and good luck :slight_smile:

1 Like