Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Shortcut for Commenting in Js. #176

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions basics/basic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let a = 101;
let b = "101";

console.log(a===b)
5 changes: 5 additions & 0 deletions basics/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ In Javascript, comments can be written in 2 different ways:

- Line starting with `//`:

Keyboard Shortcuts for commenting a line :
For Windows (Single Line Comment) --> Ctrl + /
For Windows (Multi Line Comment) --> Shift +Alt +A
For Mac --> Command + /

```javascript
// This is a comment, it will be ignored by the interpreter
var a = "this is a variable defined in a statement";
Expand Down
7 changes: 7 additions & 0 deletions basics/equality.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ var foo = 42;
var bar = 42;
var baz = "42";
var qux = "life";

// Another Example of `===`
var abc = 101;
var def = "101";
// CASE 1 : `==`
```In case 1 output will be true because "==" operator only checks var are equal
Case 2: '===' this operators also check its type(datatype). In our case abc is integer and def is a string so output will be false.```
```

`foo == bar` will evaluate to `true` and `baz == qux` will evaluate to `false`, as one would expect. However, `foo == baz` will _also_ evaluate to `true` despite `foo` and `baz` being different types. Behind the scenes the `==` equality operator attempts to force its operands to the same type before determining their equality. This is in contrast to the `===` equality operator.
Expand Down