Tell me my mistakes or errors. And paste the write code for me #127
Unanswered
alexmathew11
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@alexmathew11 I hope you can format the document so that I can see clearly where your code is. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is a very basic jokes app which I am making can you please help me why inst not working
function splitStringByCount(str, count) {
const arr = [];
for (let i = 0; i < str.length; i += count) {
arr.push(str.substr(i, count));
}
return arr;
}
function randomNum(lowerInteger, upperInteger) {
let choices = upperInteger - lowerInteger + 1;
return Math.floor(Math.random() * choices + lowerInteger);
}
var sn=0
var word={}
word.raw_word=
The safe way to double your money is to fold it over once and put it in pocket. -kin hubbard Apple has Air, Amazon has fire, Google has earth. I think Microsoft should create something called water. why did the picture go to jail? Because it was framed. I changed my password to incorrect. so whenever i forget what it is the conputer will say your password is incorrect. I changed my facebook username to NOBODY so that way when people post crappy posts, and I press the like button it will say NOBODY likes your post. My doctor asked if anyone in my family suffers from mental illness. I said: No we all seem to enjoy it. Children in the backseat can cause accidents. Accidents in the backseat can cause children Where does all my money Go? its like hocus pocus I am brokus. Never give up your dreams. keep sleeping 😴. Money is not a problem. The problem is that i dont have any of it. My fake plants died because i did not pretend to water them. - mitch hedberg I am in shape. Round is a shape. Teacher: i am beautiful. what tense is this ? Me: Past tense obviously. what animal is always at baseball game. A bat. the difference between stupidity and genius is that genius has its limits. Exercise is a dirty word. Every time I hear it, i wash my mouth with chocolate. I told my dad to embrace his mistakes he cried. Then he hugged my sister and me. Life is a soup and i am a freaking fork. Wifi went down for 5 minutes , so i had to talk to my family. They seem like nice people. I wondered why the frisbee was getting bigger, and then it hit me when i get to work, I first hide. because a good worker is hard to find.
word=word.raw_word.split('\n')
var num=randomNum(0, word.length)
var text1 = hmUI.createWidget(hmUI.widget.TEXT, {
x: 10,
y: 70,
w: 180,
h: 400,
color: 0xFFFFFF,
text_size: 20,
text_style: hmUI.text_style.WRAP,
text: ''+word[num].split('|')[0]
})
text1.addEventListener(hmUI.event.CLICK_DOWN, ()=>{
sn += 1;
num=randomNum(0, word.length)
text1.setProperty(hmUI.prop.TEXT, word[num].split('|')[0]);
text2.setProperty(hmUI.prop.TEXT, splitStringByCount(''+word[num].split('|')[1], 5).join('\n'));
number.setProperty(hmUI.prop.TEXT, ''+sn)
Beta Was this translation helpful? Give feedback.
All reactions