Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
45 views
in General by (65.1k points)
closed by

JavaScript Syntax and Rules.

1 Answer

+1 vote
by (68.9k points)
selected by
 
Best answer

JavaScript syntax is the set of rules that define a structured JavaScript. Here are some tips to remember when writing your first JavaScript program. 

1. Case Sensitivity: JavaScript is case sensitive i.e., uppercase letters and lower-case letters have different meanings. For example, the word “alert” has a lowercase “a”. So, if we type the word with an uppercase “A”, then the alert box will not be displayed and the JavaScript code won't get executed. 

2. Whitespace & Line Break: You can use spaces, tabs, and newlines anywhere in the JavaScript Program. The JavaScript interpreter ignores them. Use tabs & spaces to neatly format or indent your code. It makes the code easy to read & understand. 

3. Comments: The JavaScript allows us to add single line comments or Multi line comments.

Single-line comments (//) - Any text between a // and the end of a line treated as a comment. 

javascript syntax

Multi-line comments (/**/) - These comments may span multiple lines. 

javascript syntax

Related questions

0 votes
1 answer
asked Nov 13, 2024 in General by LokeshVerma (65.1k points)
0 votes
1 answer
0 votes
1 answer
asked Nov 13, 2024 in General by LokeshVerma (65.1k points)
0 votes
1 answer
asked Nov 13, 2024 in General by LokeshVerma (65.1k points)

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...