-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic-data-types-string.js
More file actions
52 lines (36 loc) · 1.46 KB
/
basic-data-types-string.js
File metadata and controls
52 lines (36 loc) · 1.46 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
//8 Kyu
//Basic data types--string
//Fundamentals
// In javascript, String is one of basic data types. Use "" or '' to declare a string variable. It can be letters:a,b,c,A,B,C, numbers: 123..., Various symbol:@#$%^&* , Control symbol:\n,\t etc..
// String can use operators +, Connect two or more strings together.
// Task
// misson 1: I've create three function, and defined some global variables, please select some variables that can make up the name of the function, and return them(Please note the uppercase and lowercase letters are different).
// When you have finished the work, click "Run Tests" to see if your code is working properly.
// misson 2: After misson 1 finished. you should click "Attempt" to see my three questions, and write the answer in function answer1, answer2,answer3
// If everything is right, click "Submit" again to submit your code pass this kata.
//Solution
var a1="A",a2="a",b1="B",b2="b",c1="C",c2="c",d1="D",d2="d",e1="E",e2="e",n1="N",n2="n"
function Dad(){
//select some variable to combine "Dad"
return d1 + a2 + d2 ;
}
function Bee(){
//select some variable to combine "Bee"
return b1+e2+e2;
}
function banana(){
return b2+a2+n2+a2+n2+a2
}
//answer some questions if you finished works above
function answer1(x){
//the answer should be "yes" or "no"
return "no";
}
function answer2(x){
//the answer should be "yes" or "no"
return "no";
}
function answer3(x){
//the answer should be "yes" or "no"
return "yes";
}