[help][js] Get started "hello-world" [solved]

Hey, I’m new here and get stuck on basics :frowning:
Want to use JS but for the beginning, I try to build own resource reading this tutorial https://forum.cfx.re/t/how-to-create-a-basic-script/3380
and after I make it working I try to transpile to JavaScript with help from documentation
and I cannot make it to work :frowning:

Here is the code I have written


resource_manifest_version '1159-eba1701f1961f652c9d7f2033ee0dc156c1dc5d5'

client_script 'client.js'


const event = (a, b) => {
	console.log('test' a, b);
	emit("chat:addMessage", {
		color = { 255, 0, 0},
		multiline = true,
		args = {"Me", "Please be careful to not step on too many snails!"}

on("baseevents:onPlayerWasted", event);
on("baseevents:onPlayerDied", event);

found problem i named const event and that make a problem after i remained to some random name fixed my problem