Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

java script

function makeTask(data) {
  const completed = false;
  const category = "General";
  const priority = "Normal";

}

*Вызов makeTask({})
возвращает { category: "General", priority: "Normal", completed: false }

*Вызов makeTask({ category: "Homemade", priority: "Low", text: "Take out the trash" })
возвращает { category: "Homemade", priority: "Low", text: "Take out the trash", completed: false }

*Вызов makeTask({ category: "Finance", text: "Take interest" })
возвращает { category: "Finance", priority: "Normal", text: "Take interest", completed: false }

*Вызов makeTask({ priority: "Low", text: "Choose shampoo" })
возвращает { category: "General", priority: "Low", text: "Choose shampoo", completed: false }

*Вызов makeTask({ text: "Buy bread" })
возвращает { category: "General", priority: "Normal", text: "Buy bread", completed: false }
Source by www.roblox.com #
 
PREVIOUS NEXT
Tagged: #java #script
ADD COMMENT
Topic
Name
4+1 =