Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 37dead3

Browse files
Add files via upload
1 parent f48272d commit 37dead3

File tree

1 file changed

+183
-0
lines changed

1 file changed

+183
-0
lines changed

‎index.js‎

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
/*var tweet= prompt("Enter your tweet:");
2+
var tweetCount= tweet.length;
3+
alert(tweet.length);
4+
var tweetLeft= 140-tweetCount;
5+
alert("You have written " + tweet.length +" charaters." + " You have " + (140-tweet.length) + " characters remaining.");
6+
var finalTweet= tweet.slice(0,140);
7+
alert(finalTweet);
8+
alert( prompt( "Compose your tweet:").slice(0,140) ); */
9+
10+
/* var Name=("Harshitha");
11+
Name.toUpperCase(); */
12+
13+
/*var name = prompt("Enter your Name");
14+
var upperName= (name.slice(0,1)).toUpperCase();
15+
var lowerName= (name.slice(1,)).toLowerCase();
16+
alert("Hello, "+ upperName + lowerName); */
17+
18+
//alert("Hello, "+ ( ( name.slice(0,1) ).toUpperCase() ) + ( ( name.slice(1, ) ).toLowerCase() ));
19+
20+
/* var dogAge=prompt("Enter you Dog's Age: ")
21+
var humanAge= ((dogAge-2)*4)+21 ; */
22+
/*alert("The human age is "+ ( ((( prompt("Enter your Dog's age: ") )-2)*4)+21 )+" years.");
23+
24+
25+
//Functions : Stanford Karel
26+
27+
function main(){
28+
29+
startPoint();
30+
startPoint();
31+
startPoint();
32+
startPoint();
33+
}
34+
35+
function endPoint (){
36+
move();
37+
move();
38+
move();
39+
move();
40+
turnLeft();
41+
move();
42+
move();
43+
move();
44+
move();
45+
}
46+
47+
function startPoint(){
48+
endPoint();
49+
turnLeft();
50+
endPoint();
51+
turnLeft();
52+
}
53+
54+
//Zig-Zag
55+
function main(){
56+
endPoint();
57+
endPoint();
58+
endPoint();
59+
60+
move();
61+
turnLeft();
62+
move();
63+
64+
65+
66+
}
67+
function endPoint (){
68+
move();
69+
turnLeft();
70+
move();
71+
turnRight();
72+
}
73+
74+
//Diagonal Beeper
75+
76+
function main(){
77+
78+
diagonalBeeper ();
79+
diagonalBeeper ();
80+
81+
putBeeper();
82+
83+
84+
85+
}
86+
function diagonalBeeper (){
87+
putBeeper();
88+
move();
89+
turnLeft();
90+
move();
91+
92+
putBeeper();
93+
move();
94+
turnRight();
95+
move();
96+
}
97+
98+
//H code
99+
100+
function main(){
101+
102+
putBeeper();
103+
turnLeft();
104+
105+
move();
106+
putBeeper();
107+
108+
move();
109+
putBeeper();
110+
111+
move();
112+
putBeeper();
113+
114+
move();
115+
putBeeper();
116+
117+
turnRight();
118+
move();
119+
move();
120+
move();
121+
move();
122+
123+
putBeeper();
124+
turnRight();
125+
126+
move();
127+
putBeeper();
128+
129+
move();
130+
putBeeper();
131+
132+
move();
133+
putBeeper();
134+
135+
move();
136+
putBeeper();
137+
138+
turnRight();
139+
turnRight();
140+
141+
move();
142+
move();
143+
144+
turnLeft();
145+
146+
move();
147+
putBeeper();
148+
149+
move();
150+
putBeeper();
151+
152+
move();
153+
putBeeper();
154+
155+
move();
156+
157+
}*/
158+
159+
var output=[];
160+
var count=1;
161+
162+
function fizzbuzz(){
163+
164+
165+
if(count%3===0 && count%5!==0){
166+
output.push("Fizz");
167+
}
168+
169+
else if(count%5===0 && count%3!==0){
170+
output.push("Buzz");
171+
}
172+
173+
else if(count%15===0){
174+
output.push("FizzBuzz");
175+
176+
}
177+
else{
178+
output.push(count);
179+
}
180+
181+
count++;
182+
console.log(output);
183+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /