White space and line break


JavaScript white space and line break :

If we have more than one white space in a string, then browser collapses all the white spaces to single white space. Hence to add more than one white space in between words or characters we use html entity ampersandnbsp;.

 . indicates non breaking white space, which adds single space.

We can use  . any number of times to add more white spaces.

HTML br tag in JavaScript Code:
To add line break we can use html br tag in a string.
html br tag moves the cursor to Nextline so that from their on Nextcontent can be placed or written.

Interview Questions:

1. JavaScript is developed by ________________
a. James Gosling
b. Tim Burners Lee
c. Hakon Wium Lie
d. Brandon Each
Answer: d

2. JavaScript is developed at _____________
b. Netscape
c. Sun Micro systems
d. Micorsoft
Answer: b

3. The Original name of JavaScript is ____________
a. Oak
c. Mocha
d. Action Script
Answer: c