Skip to content

Commit 87b60cd

Browse files
authored
Update README.md
Small clarification on 95
1 parent 7758a30 commit 87b60cd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,13 +2167,13 @@
21672167
21682168
95. ### What is the difference between an attribute and a property
21692169
2170-
Attributes are defined on the HTML markup whereas properties are defined on the DOM. For example, the below HTML element has 2 attributes type and value,
2170+
Attributes are defined on the HTML markup whereas properties are defined on the DOM. For example, the below HTML element has 2 attributes: `type` and `value`,
21712171
21722172
```javascript
21732173
<input type="text" value="Name:">
21742174
```
21752175
2176-
You can retrieve the attribute value as below,
2176+
You can retrieve the attribute value as below, for example after typing "Good morning" into the input field:
21772177
21782178
```javascript
21792179
const input = document.querySelector("input");
@@ -2190,13 +2190,13 @@
21902190
21912191
**[⬆ Back to Top](#table-of-contents)**
21922192
2193-
96. ### What is same-origin policy
2193+
97. ### What is same-origin policy
21942194
21952195
The same-origin policy is a policy that prevents JavaScript from making requests across domain boundaries. An origin is defined as a combination of URI scheme, hostname, and port number. If you enable this policy then it prevents a malicious script on one page from obtaining access to sensitive data on another web page using Document Object Model(DOM).
21962196
21972197
**[⬆ Back to Top](#table-of-contents)**
21982198
2199-
97. ### What is the purpose of void 0
2199+
98. ### What is the purpose of void 0
22002200
22012201
Void(0) is used to prevent the page from refreshing. This will be helpful to eliminate the unwanted side-effect, because it will return the undefined primitive value. It is commonly used for HTML documents that use href="JavaScript:Void(0);" within an `<a>` element. i.e, when you click a link, the browser loads a new page or refreshes the same page. But this behavior will be prevented using this expression.
22022202
For example, the below link notify the message without reloading the page
@@ -2209,19 +2209,19 @@
22092209
22102210
**[⬆ Back to Top](#table-of-contents)**
22112211
2212-
98. ### Is JavaScript a compiled or interpreted language
2212+
99. ### Is JavaScript a compiled or interpreted language
22132213
22142214
JavaScript is an interpreted language, not a compiled language. An interpreter in the browser reads over the JavaScript code, interprets each line, and runs it. Nowadays modern browsers use a technology known as Just-In-Time (JIT) compilation, which compiles JavaScript to executable bytecode just as it is about to run.
22152215
22162216
**[⬆ Back to Top](#table-of-contents)**
22172217
2218-
99. ### Is JavaScript a case-sensitive language
2218+
100. ### Is JavaScript a case-sensitive language
22192219
22202220
Yes, JavaScript is a case sensitive language. The language keywords, variables, function & object names, and any other identifiers must always be typed with a consistent capitalization of letters.
22212221
22222222
**[⬆ Back to Top](#table-of-contents)**
22232223
2224-
100. ### Is there any relation between Java and JavaScript
2224+
101. ### Is there any relation between Java and JavaScript
22252225
22262226
No, they are entirely two different programming languages and have nothing to do with each other. But both of them are Object Oriented Programming languages and like many other languages, they follow similar syntax for basic features(if, else, for, switch, break, continue etc).
22272227

0 commit comments

Comments
 (0)