var myBook = new book("Java", "John");
You need to place the closing bracket on a new line.
You need to add the opening bracket in the same line of the object name placement.
Between property and its value, add a colon and space.
End object definition with (;)semicolon.