Skip to content

Commit f3f5341

Browse files
authored
Merge pull request #350 from mohamedabdelhaq-123/fix/typos-and-grammar
Fix typos and grammar in README.md
2 parents 3452166 + c7605bc commit f3f5341

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JavaScript Interview Questions & Answers
22

3-
> Click :star:if you like the project and follow [@SudheerJonna](https://twitter.com/SudheerJonna) for more updates. Coding questions available [here](#coding-exercise). Check [DataStructures and Algorithms](https://github.com/sudheerj/datastructures-algorithms) for DSA related questions and [ECMAScript](https://github.com/sudheerj/ECMAScript-features) for all ES features.).
3+
> Click :star:if you like the project and follow [@SudheerJonna](https://twitter.com/SudheerJonna) for more updates. Coding questions available [here](#coding-exercise). Check [DataStructures and Algorithms](https://github.com/sudheerj/datastructures-algorithms) for DSA related questions and [ECMAScript](https://github.com/sudheerj/ECMAScript-features) for all ES features.)
44
55
---
66

@@ -145,7 +145,7 @@
145145
| 122 | [How do you validate an email in javascript](#how-do-you-validate-an-email-in-javascript) |
146146
| 123 | [How do you get the current url with javascript](#how-do-you-get-the-current-url-with-javascript) |
147147
| 124 | [What are the various url properties of location object](#what-are-the-various-url-properties-of-location-object) |
148-
| 125 | [How do get query string values in javascript](#how-do-get-query-string-values-in-javascript) |
148+
| 125 | [How do you get query string values in javascript](#how-do-you-get-query-string-values-in-javascript) |
149149
| 126 | [How do you check if a key exists in an object](#how-do-you-check-if-a-key-exists-in-an-object) |
150150
| 127 | [How do you loop through or enumerate javascript object](#how-do-you-loop-through-or-enumerate-javascript-object) |
151151
| 128 | [How do you test for an empty object](#how-do-you-test-for-an-empty-object) |
@@ -1384,7 +1384,7 @@ Because of hoisting, functions can be used before they are declared.
13841384
13851385
27. ### What are classes in ES6
13861386
1387-
In ES6, Javascript classes are primarily syntactic sugar over JavaScript’s existing prototype-based inheritance.
1387+
In ES6, JavaScript classes are primarily syntactic sugar over JavaScript’s existing prototype-based inheritance.
13881388
For example, the prototype based inheritance written in function expression as below,
13891389
13901390
```javascript
@@ -2805,7 +2805,7 @@ Because of hoisting, functions can be used before they are declared.
28052805
28062806
**[⬆ Back to Top](#table-of-contents)**
28072807
2808-
125. ### How do get query string values in javascript
2808+
125. ### How do you get query string values in javascript
28092809
28102810
You can use URLSearchParams to get query string values in javascript. Let's see an example to get the client code value from URL query string,
28112811
@@ -3435,7 +3435,7 @@ Because of hoisting, functions can be used before they are declared.
34353435

34363436
163. ### What would be the result of 1+2+'3'
34373437

3438-
The output is going to be `33`. Since `1` and `2` are numeric values, the result of the first two digits is going to be a numeric value `3`. The next digit is a string type value because of that the addition of numeric value `3` and string type value `3` is just going to be a concatenation value `33`. Other operationrs like `3 * '3'` do yield correct results because the string is coerced into a number.
3438+
The output is going to be `33`. Since `1` and `2` are numeric values, the result of the first two digits is going to be a numeric value `3`. The next digit is a string type value because of that the addition of numeric value `3` and string type value `3` is just going to be a concatenation value `33`. Other operations like `3 * '3'` do yield correct results because the string is coerced into a number.
34393439

34403440
**[⬆ Back to Top](#table-of-contents)**
34413441

@@ -3521,7 +3521,7 @@ Because of hoisting, functions can be used before they are declared.
35213521
35223522
169. ### How do you get the image width and height using JS
35233523
3524-
You can programmatically get the image and check the dimensions(width and height) using Javascript.
3524+
You can programmatically get the image and check the dimensions(width and height) using JavaScript.
35253525
35263526
```javascript
35273527
var img = new Image();
@@ -3580,7 +3580,7 @@ Because of hoisting, functions can be used before they are declared.
35803580
35813581
173. ### What are the properties used to get size of window
35823582
3583-
You can use innerWidth, innerHeight, clientWidth, clientHeight properties of windows, document element and document body objects to find the size of a window. Let's use them combination of these properties to calculate the size of a window or document,
3583+
You can use innerWidth, innerHeight, clientWidth, clientHeight properties of windows, document element and document body objects to find the size of a window. Let's use a combination of these properties to calculate the size of a window or document,
35843584
35853585
```javascript
35863586
var width =
@@ -5313,7 +5313,7 @@ Because of hoisting, functions can be used before they are declared.
53135313
273. ### How do you perform form validation using javascript
53145314

53155315
JavaScript can be used to perform HTML form validation. For example, if the form field is empty, the function needs to notify, and return false, to prevent the form being submitted.
5316-
Lets' perform user login in an html form,
5316+
Let's perform user login in an html form,
53175317

53185318
```html
53195319
<form name="myForm" onsubmit="return validateForm()" method="post">
@@ -5603,7 +5603,7 @@ Because of hoisting, functions can be used before they are declared.
56035603

56045604
290. ### What is the difference between java and javascript
56055605

5606-
Both are totally unrelated programming languages and no relation between them. Java is statically typed, compiled, runs on its own VM. Whereas Javascript is dynamically typed, interpreted, and runs in a browser and nodejs environments. Let's see the major differences in a tabular format,
5606+
Both are totally unrelated programming languages and no relation between them. Java is statically typed, compiled, runs on its own VM. Whereas JavaScript is dynamically typed, interpreted, and runs in a browser and nodejs environments. Let's see the major differences in a tabular format,
56075607
| Feature | Java | JavaScript |
56085608
|---- | ---- | -----
56095609
| Typed | It's a strongly typed language | It's a dynamic typed language |
@@ -6924,7 +6924,7 @@ Because of hoisting, functions can be used before they are declared.
69246924
69256925
```javascript
69266926
const obj = { x: 1 };
6927-
// Grabs obj.x as as { otherName }
6927+
// Grabs obj.x as { otherName }
69286928
const { x: otherName } = obj;
69296929
```
69306930
@@ -9058,7 +9058,7 @@ The polyfills for array methods such as map, filter and reduce methods can be cr
90589058
90599059
Both map and forEach functions are used to iterate over an arrays but there are some differences in their functionality.
90609060
9061-
1. **Returning values:** The `map` method returns a new array with transformed elements whereas `forEach` method returns `undefined` eventhough both of them are doing the same job.
9061+
1. **Returning values:** The `map` method returns a new array with transformed elements whereas `forEach` method returns `undefined` even though both of them are doing the same job.
90629062
90639063
```javascript
90649064
const arr = [1, 2, 3, 4, 5];
@@ -12450,7 +12450,7 @@ console.log(arr.sort());
1245012450
1245112451
##### Answer: 3
1245212452
12453-
Javascript has a native method sort that allows sorting an array of elements in-place. It will treat each element as a string and sort it alphabetically. But if you try to sort an array of strings which has non-ASCII characters, you will receive a strange result. This is because characters with an accent have higher character codes.
12453+
JavaScript has a native method sort that allows sorting an array of elements in-place. It will treat each element as a string and sort it alphabetically. But if you try to sort an array of strings which has non-ASCII characters, you will receive a strange result. This is because characters with an accent have higher character codes.
1245412454
1245512455
In this case, the sort order of an array is ['Wann', 'Woche', 'wäre', 'wöchentlich'].
1245612456

0 commit comments

Comments
 (0)