I can show answer, How can I mark card and flag card using such command?
Tags are for notes and in fact is built in as a tag. So to mark a note you would need to add “Marked” tag. Is there any reason you want to use JS and not by menus or shortcuts?
On AnkiDroid it’s possible by using the AnkiDroidJS interface; in AnkiDesktop it would be possible with add-ons, adding new bridge commands (invoked via
pycmd); in AnkiMobile it’s not possible.
Yes, But I want to combine AnkiDroid JS API with Anki ecosystem.