Зміст курсу
Introduction to JavaScript
Introduction to JavaScript
1. Getting Started
Hello WorldTask - Show some OutputTask - Output Multiple LinesNumbersTask - Working with NumbersTask - Calculate the Speed of a CarTask - Calculate Area of a TrapeziumOutputting Multiple ValuesTask - Meaningful OutputCommentsTask - Adding a commentMulti-Line CommentsTask - Commenting out CodeTask - Coffee Shop SalesWhat is JavaScript anyway?
2. Manipulating Data
Storing DataTask - Declaring a VariableTask - Accessing Data From a VariableTask - Fixing Variable NamesTask - Reassigning a VariableConstantsTask - Declaring & Using ConstantsPerforming Arithmetic On VariablesTask - Making a Salary CalculatorTask - Adjusting Salary with a BonusTypes of DataTask - Declare a Boolean ValueHow different Data Types InteractTask - Concatenating StringsTask - User Profile & Activity Details
3. Conditional Statements
Task - User Profile & Activity Details
Завдання
Swipe to start coding
You're developing a user profile and activity tracker for a website. In this task, you'll practice most of the concepts we looked at in the previous chapters.
Your task is to:
- Declare a constant called
DEFAULT_COUNTRY
with the value"United States"
. - Declare a variable
username
and assign it"John Doe"
. - Declare a variable
age
and set it to30
. - Declare a variable called
country
and set it equal toDEFAULT_COUNTRY
. - Declare a variable
isSubscribed
and set it totrue
. - Declare a variable
loginCount
and set it to5
. - Declare a variable
loginReward
and set it to250
.
- In the next line, increment the
loginCount
using the++
operator. - Increase
loginReward
by50
using the+=
operator.
-
Declare a variable
welcomeMessage
that joins the following strings using the+
operator in order:username
" is "
age
" years old and has logged in "
loginCount
" times. The Login Reward balance is "
loginReward
-
Output
welcomeMessage
usingconsole.log()
.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 2. Розділ 15
Task - User Profile & Activity Details
Завдання
Swipe to start coding
You're developing a user profile and activity tracker for a website. In this task, you'll practice most of the concepts we looked at in the previous chapters.
Your task is to:
- Declare a constant called
DEFAULT_COUNTRY
with the value"United States"
. - Declare a variable
username
and assign it"John Doe"
. - Declare a variable
age
and set it to30
. - Declare a variable called
country
and set it equal toDEFAULT_COUNTRY
. - Declare a variable
isSubscribed
and set it totrue
. - Declare a variable
loginCount
and set it to5
. - Declare a variable
loginReward
and set it to250
.
- In the next line, increment the
loginCount
using the++
operator. - Increase
loginReward
by50
using the+=
operator.
-
Declare a variable
welcomeMessage
that joins the following strings using the+
operator in order:username
" is "
age
" years old and has logged in "
loginCount
" times. The Login Reward balance is "
loginReward
-
Output
welcomeMessage
usingconsole.log()
.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 2. Розділ 15