Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
tshemsedinov committed Apr 1, 2021
1 parent 3dead74 commit cebd8f3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"parserOptions": {
"ecmaVersion": 2020
},
"globals": {
"BigInt": true
},
"rules": {
"indent": [
"error",
Expand Down Expand Up @@ -213,7 +210,7 @@
],
"arrow-parens": [
"error",
"as-needed"
"always"
],
"arrow-body-style": [
"error",
Expand Down
2 changes: 1 addition & 1 deletion JavaScript/2-const-let.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
console.dir({ hoisted }); // { hoisted: undefined }
hoisted = 5; // Assign 5 to hoisted
console.dir({ hoisted }); // { hoisted: 5 }
var hoisted; // Declare hoisted
let hoisted; // Declare hoisted

let scalarVariable = 6;
const scalarConstant = 7;
Expand Down
10 changes: 5 additions & 5 deletions JavaScript/6-parse.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

console.log(parseInt('11', 2)); // 3
console.log(parseInt('11', 8)); // 9
console.log(parseInt('11', 16)); // 17
console.log(0b11); // 3
console.log(0o11); // 9
console.log(0x11); // 17

console.log(parseInt(5, 10)); // 5
console.log(parseInt('5', 10)); // 5
Expand All @@ -25,7 +25,7 @@ console.log(0.0000005, parseInt(0.0000005, 10)); // 5e-7 5
console.log(0.000005, parseInt(0.000005, 10)); // 0.000005 0

// 255
console.log(parseInt('fF', 16));
console.log(0xfF);
console.log(parseInt('0xff', 16));
console.log(parseInt('0xFf', 16));
console.log(parseInt(' 0xFf ', 16));
Expand All @@ -36,7 +36,7 @@ console.log(parseInt('ff', 8));
console.log(parseInt('ff', 10));
console.log(parseInt('ff', 15));

console.log(parseInt('ff', 16)); // 255
console.log(0xff); // 255
console.log(parseInt('ff', 17)); // 270
console.log(parseInt('ff', 20)); // 315
console.log(parseInt('ff', 30)); // 465
Expand Down

0 comments on commit cebd8f3

Please sign in to comment.