Things tried
String selectBook="abc";
String script="alert('"+selectBook+"' book does not exist');";
JavascriptExecutor js=(JavascriptExecutor)driver;
js.executeScript(script);
I want to alert the value of variable select book in alert along with the message.