docs(javascript): fix wrong javascript code in `script.mdx` (#71509)
## 📚 Improving Documentation
Hello, I've fixed an wrong JavaScript code in
`docs/02-app/02-api-reference/01-components/script.mdx`
There's no need to use type declaration in JavaScript code. So I deleted
it.
Additionally, I've wrapped some code related keywords in inline code
blocks.
Co-authored-by: JJ Kasper <jj@jjsweb.site>