Character Set
It is the set of characters reserved to write JavaScript program.In ASCII (American Standard Code of Information Interchange) character set, there were only 128 different characters.
Out of these 128 characters, 96 characters are available for use and the remaining 32 characters are reserved as controlled characters.
Special Characters
It is the set of characters reserved to write JavaScript program.In ASCII (American Standard Code of Information Interchange) character set, there were only 128 different characters.
Out of these 128 characters, 96 characters are available for use and the remaining 32 characters are reserved as controlled characters.
Special Characters
- \t - represents a tab.
- \f - represents a form feed, which is also referred as form feed.
- \b - represents a backspace.
- \n - represents a new line.
- \r - represents a carriage return character, which is used to start a new line of text.
- \" - represents a double quote.
- \' - represents a single quote.
- \\ - represents a back space.
example
<!DOCTYPE html>
<html>
<head>
<title>javaScript Character Set</title>
</head>
<body>
<h1>JavaScript Character Set</h1>
<script>
var number = 23;
var Number = 45;
var NumBer = 67;
document.write("\t" + number + "<br />" );
document.write("\\" + Number + "<br />");
document.write("\'" + NumBer + "\'" );
</script>
</body>
</html>
Case Sensitivity
JavaScript is a case-sensitive language, which means that the keywords, variable names, function names and every thing else should be typed with a consistent casing of letters.
<!DOCTYPE html>
<html>
<head>
<title>javaScript Case Sensitivity</title>
</head>
<body>
<h1>JavaScript Case Sensitivity</h1>
<script>
var number = 23;
var Number = 45;
var NumBer = 67;
document.write(number + "<br />" );
document.write(Number + "<br />");
document.write(NumBer);
</script>
</body>
</html>
0 comments:
Post a Comment