Java Reference
In-Depth Information
Table 4-1. The List of Reserved Words in Nashorn Used as Keywords
break
do
instanceof
typeof
case
else
new
var
catch
finally
return
void
continue
for
switch
while
debugger
function
this
with
default
if
throw
delete
in
try
Table 4-2. The List of Future Reserved Words in Nashorn
class
enum
extends
super
const
export
import
Table 4-3. The List of Future Reserved Words in Strict-Mode in Nashorn
implements
let
private
public
yield
interface
package
protected
static
Comments
Nashorn supports two types of comments:
Single-line comments
Multi-line comments
The syntax for writing comments in Nashorn is the same as that of Java. The
following are examples of comments:
// Let us declare a variable named empId (A single-line comment)
var empId;
/* Let us declare a variable named empList
and another variable named deptId (A multi-line comment)
*/
var empList;
var deptId;
 
Search WWH ::




Custom Search