From 60669a00f15b06118ec31e2bebb1b95febf1c268 Mon Sep 17 00:00:00 2001 From: enjoy15 Date: Mon, 29 Sep 2025 20:21:47 +0100 Subject: [PATCH 1/2] chrome.md --- Sprint-1/4-stretch-explore/chrome.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sprint-1/4-stretch-explore/chrome.md b/Sprint-1/4-stretch-explore/chrome.md index e7dd5feaf..27a558094 100644 --- a/Sprint-1/4-stretch-explore/chrome.md +++ b/Sprint-1/4-stretch-explore/chrome.md @@ -11,8 +11,11 @@ In the Chrome console, invoke the function `alert` with an input string of `"Hello world!"`; What effect does calling the `alert` function have? +->It creat a pop up with the word "Hello world!" Now try invoking the function `prompt` with a string input of `"What is your name?"` - store the return value of your call to `prompt` in an variable called `myName`. What effect does calling the `prompt` function have? What is the return value of `prompt`? +-> It displays a dialog box in the browser asking the user to enter some input. +The user can type a response and click "OK" or click "Cancel". From 585c2359298cbb532e38a322de9a127ed136fbb4 Mon Sep 17 00:00:00 2001 From: enjoy15 Date: Mon, 29 Sep 2025 20:29:39 +0100 Subject: [PATCH 2/2] objects.md --- Sprint-1/4-stretch-explore/objects.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sprint-1/4-stretch-explore/objects.md b/Sprint-1/4-stretch-explore/objects.md index 0216dee56..7e322bbc8 100644 --- a/Sprint-1/4-stretch-explore/objects.md +++ b/Sprint-1/4-stretch-explore/objects.md @@ -5,12 +5,19 @@ In this activity, we'll explore some additional concepts that you'll encounter i Open the Chrome devtools Console, type in `console.log` and then hit enter What output do you get? +-> ƒ log() { [native code] } Now enter just `console` in the Console, what output do you get back? +-> console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …} Try also entering `typeof console` +->'object' Answer the following questions: What does `console` store? +->console stores an object that contains functions for outputting information to the browser’s debugging console. + What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean? +->The . operator accesses a specific property or method on an object. console.log means "use the log function from the console object. +console.assert means access the assert function inside the console object. \ No newline at end of file