Quoc: The War of the Worlds is a science fiction novel by English author H.G. Wells first serialised in 1897 by Pearson's Magazine in the UK and by Cosmopolitan magazine in the US. The novel's first appearance in hardcover was in 1898 from publisher William Heinemann of London. Written between 1895 and 1897, it is one of the earliest stories that detail a conflict between mankind and an extraterrestrial race. The novel is the first-person narrative of both an unnamed protagonist in Surrey and of his younger brother in London as southern England is invaded by Martians. The novel is one of the most commented-on works in the science fiction canon.

Answer this question based on the passage: when did hg wells write war of the worlds?
HW Chung: OK, some thoughts:
The relevant information is: The War of the Worlds is a science fiction novel by English author H.G. Wells first serialised in 1897 by Pearson's Magazine in the UK and by Cosmopolitan magazine in the US. The answer is 1897.