[SubMacro] - Javascript/Typescript - Define a variable Macro (v10.0.2)

[SubMacro] - Javascript/Typescript - Define a variable Macro (v10.0.2)

Hello, I am trying to become a full stack web developer as a part time career as fast as I can so I believe KM is a perfect fit for it. I'd like to get your opinions on two macros I'm about to post. Perhaps someone could tell me what I'm doing right and what I've done wrong.


[SubMacro] - Javascript-Typescript - Define a variable.kmmacros (38 KB)

I'm not qualified to be a full stack web developer so I can only help with KM issues. Still, I love to help people. The question "what am I doing wrong" is imprecise. Are you trying to fix a bug or just change your coding styles to make them better?

I just wondering how others would have achieved the same thing.

There is alot of time wasted in renaming macros. I wish there was a condition rules inside KM settings that allow you to set how you want a node (submacro) title to display.

I'm not getting much answers on these posts so I guess there is nothing wrong with my approach.

I read your macro. It does what it does, without errors. But I don't know what you want it to do, so I can't tell if you are doing anything "wrong."

Maybe there are others on this site who know VSCode and Javascript so they might be able to tell you whether you're "doing right or wrong."

So far you've given people only 13 hours to respond. Maybe some people are sleeping and come here only once per day. I'm one of only a few people who likes to monitor this website all day, to help people. I'm not able to help you much because I don't know what you are trying to do.

It looks to me like you are trying to create initialization statements for some other language. Wouldn't it be quicker to type in the statements manually than to use KM to fill out forms to create those statements?

It sounds like these are two new questions, unrelated to your first question. Usually it's wiser to put each different question on its own page. It increased the chance that someone will read it.

1 Like