-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathcoding-concepts.js
More file actions
55 lines (36 loc) · 1.39 KB
/
coding-concepts.js
File metadata and controls
55 lines (36 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// UNIT 1 ASSESSMENT: Coding Conceptual Questions
// Examine the following examples.
// First, predict the outcome based on your understanding of the code.
// Then, uncomment the console.log() and verify the output. Briefly explain WHY your initial answer was correct or incorrect.
// There is no need to change any of the code.
// --------------------INSTRUCTOR EXAMPLE: What will this log?
const colors = ["tangerine", "magenta", "lilac", "daffodil"]
// console.log(colors.push("indigo"))
// a) Your answer:
// b) Verify and explain:
// --------------------1) What will this log?
const cohort = "LEARN 2023"
// console.log(cohort.length)
// a) Your answer:
// b) Verify and explain:
// --------------------2) What will this log?
const greeting = "Hello World!"
// console.log(greeting[4])
// a) Your answer:
// b) Verify and explain:
// --------------------3) What will this log?
const languages = ["JavaScript", "Ruby", "Python", "C++"]
const index = 1
// console.log(languages[index])
// a) Your answer:
// b) Verify and explain:
// --------------------4) What will this log?
const weekendDays = ["saturday", "sunday"]
// console.log(weekendDays.toUpperCase())
// a) Your answer:
// b) Verify and explain:
// --------------------5) What will this log?
const dataTypes = ["number", "string", "Boolean", "undefined"]
// console.log(typeof dataTypes.length)
// a) Your answer:
// b) Verify and explain: