Skip to content

Conversation

@dmytro-khyzhniak
Copy link
Collaborator

HW#2 done.

Copy link
Owner

@DmitryKorolDevPro DmitryKorolDevPro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Comment on lines +147 to +157
function example1_8_0() {
var dmytroKhyzhniak;
let coolDmytroKhyzhniak;
const dmytroKorol;
}

// 1.8.1 In other languages you can see PascalCase, snake_case, kebab-case.
function example1_8_1() {
var ThisIsPascalCase;
let this_is_snake_case;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessary. primarily depends on the agreements on the project

Comment on lines +190 to +198
// BUILDING STRARTED 🕐
let floor1 = 'Floor #1 | □ □ | LET';
const floor2 = 'Floor #2 | □ □ | CONST';
var floor3 = 'Floor #3 | □ □ | VAR';
let floor4 = function() { return 'Floor #4 | □ □ | LET FUNCTION EXPESSION' };
const floor5 = function() { return 'Floor #5 | □ □ | CONST FUNCTION EXPESSION' };
var floor6 = function() { return 'Floor #6 | □ □ | VAR FUNCTION EXPESSION' };
function floor7() { return 'Floor #7 | □ □ | FUNCTION DECLARATION' };
// ✅ BUILDING COMPLETED ✅

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got the idea, but it's better to use formatting by the first character in the line)

Comment on lines +567 to +587
let user = {
name: "Dmytro",
platform: "PC",
}

function setUserToken(user) {
let todaysToken = '25006eb5cb6b9aa164f8fc50e06546d3';

function generateCustomToken() {
let randomID = Math.round(Math.random() * 1000);
// TODO: check if ID is free
let generatedToken = `${randomID}#${todaysToken}`;
user.token = generatedToken;

return generatedToken;
}

return generateCustomToken();
}

console.log(setUserToken(user));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"default value for a function" - meanы something like
function coolFunc(data = 11) { console.log(data); }

@dmytro-khyzhniak dmytro-khyzhniak changed the title Task done HW#2 Khyzhniak Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants