0
0
Firebasecloud~10 mins

Cost monitoring and budgets in Firebase - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set a budget amount in Firebase Billing.

Firebase
const budgetAmount = [1]; // amount in USD
Drag options to blanks, or click blank then click option'
A1000
B0
C500
D-100
Attempts:
3 left
💡 Hint
Common Mistakes
Using zero or negative numbers as budget amount
Using strings instead of numbers
2fill in blank
medium

Complete the code to create a budget filter for a specific project ID.

Firebase
const budgetFilter = { projectId: '[1]' };
Drag options to blanks, or click blank then click option'
Amy-project-123
Bproject-xyz
Cproject_001
D123-my-project
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid characters in project ID
Mixing up project ID with project name
3fill in blank
hard

Fix the error in the budget alert threshold percentage.

Firebase
const alertThreshold = [1]; // percentage value
Drag options to blanks, or click blank then click option'
A50
B1.5
C150
D-10
Attempts:
3 left
💡 Hint
Common Mistakes
Using values greater than 100
Using negative values
4fill in blank
hard

Fill both blanks to create a budget alert condition for when cost exceeds a threshold.

Firebase
const alertCondition = { costAmount: [1], comparison: '[2]' };
Drag options to blanks, or click blank then click option'
A100
B200
CGREATER_THAN
DLESS_THAN
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'LESS_THAN' instead of 'GREATER_THAN'
Using a cost amount too low or negative
5fill in blank
hard

Fill all three blanks to define a budget with a name, amount, and alert threshold.

Firebase
const budget = { name: '[1]', amount: [2], alertThreshold: [3] };
Drag options to blanks, or click blank then click option'
AMonthlyBudget
B300
C75
DYearlyBudget
Attempts:
3 left
💡 Hint
Common Mistakes
Using numbers as name
Setting alertThreshold over 100