Syntax Highlighting Error

I am trying to implement an editor using CodeMirror in a React App and when I am implementing it, I got an error that is quite different.

In this demo below, I want to highlight every property my ‘p’ argument has, for example, name.

function name(p){
p.name = 'Rahul';
}

Try add javascript extension and defaultHighlightStyle?

Can you please brief me, how can I do it as I am new with CodeMirror and wants to complete this task as fast as posibble?

Can you read and try the examples here: CodeMirror Examples?