Skip to content
free
K
1
2
practice
Home
Math
English
Science
Social Studies
Contact
Language
English
Español
Sign In
/
High School Electives
/
Computer Science
/
Procedures and Functions
Grade Level
Computer Science
HSCS.097 Procedures and Functions
0%
Skill Level
🔴 Hard
00:00
Progress to Next Level
25% to Medium
Easy
Medium
Hard
Mastery
100%
An app repeats code to check whether a user can edit a shared document. The rule uses role, ownerId, documentOwnerId, and isArchived. Which function definition best captures the rule?
A
define canEditAndSave(role, ownerId, documentOwnerId, isArchived) to decide permission and write changes
B
define canEditMySampleDocument() to check only one classroom example
C
define editDocument() to check permission, change text, save history, and send notifications
D
define canEditDocument(role, ownerId, documentOwnerId, isArchived) to return the permission decision
Submit Answer