[issue-305] Improve JS syntax