Click here to Skip to main content
15,843,591 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: unexpected result function autocomplete() Jquery Pin
serenimus22-Nov-18 7:11
serenimus22-Nov-18 7:11 
GeneralRe: unexpected result function autocomplete() Jquery Pin
serenimus22-Nov-18 7:13
serenimus22-Nov-18 7:13 
GeneralRe: unexpected result function autocomplete() Jquery Pin
Richard Deeming22-Nov-18 9:41
mveRichard Deeming22-Nov-18 9:41 
GeneralRe: unexpected result function autocomplete() Jquery Pin
serenimus1-Dec-18 1:19
serenimus1-Dec-18 1:19 
QuestionHello Pin
Member 1406106620-Nov-18 9:15
Member 1406106620-Nov-18 9:15 
QuestionJavascript help Pin
ghazabaz8-Nov-18 16:54
ghazabaz8-Nov-18 16:54 
AnswerRe: Javascript help Pin
Richard Deeming9-Nov-18 4:49
mveRichard Deeming9-Nov-18 4:49 
QuestionRe: Javascript help Pin
ghazabaz9-Nov-18 6:55
ghazabaz9-Nov-18 6:55 
Richard, thank you very much for the reply.

The text does not mention anything about returns, that is why I wrote it as it is Confused | :confused:

So for the return value, do I insert inside the calling of the randomInt(); function or within its definition?

randomInt(); {
     randomQ;
}


OR

function randomInt(lowest, size) {
  size = Math.random(0-9) 
  lowest = Math.floor(size);
  return randomQ;
}


Here is what I have so far:

 randomInt(); {
  return randomQ;
  }

var quoteElem = document.getElementByTagName("quote")[0];
var randomQ;

function randomInt(lowest, size) {
  size = Math.floor(Math.random() * 10);
	lowest = ???;
}

document.getElementById("quoteElem").innerHTML = getQuote(randomQ);


I am trying to figure out the lowest parameter of the randomInt function now. How will I set it up according to the instructions: "to specify the lowest possible value for the random integer" ???

**EDIT**

How about if I use the Math.min() function for the lowest parameter?

function randomInt(lowest, size) {
  size = Math.floor(Math.random() * 10);
  lowest = Math.floor(Math.min(size));
}


modified 9-Nov-18 12:15pm.

AnswerRe: Javascript help Pin
Richard Deeming9-Nov-18 8:48
mveRichard Deeming9-Nov-18 8:48 
Generalguidence for the begginners Pin
Kshitiz Thapa2-Nov-18 4:16
Kshitiz Thapa2-Nov-18 4:16 
GeneralRe: guidence for the begginners Pin
Richard MacCutchan2-Nov-18 5:00
mveRichard MacCutchan2-Nov-18 5:00 
SuggestionRe: guidence for the begginners Pin
CHill6015-Nov-18 22:46
mveCHill6015-Nov-18 22:46 
QuestionLoops Pin
Member 1403490227-Oct-18 6:06
Member 1403490227-Oct-18 6:06 
AnswerRe: Loops Pin
Richard MacCutchan27-Oct-18 6:54
mveRichard MacCutchan27-Oct-18 6:54 
QuestionSTOP VALIDATION Pin
Member 1344978425-Oct-18 1:44
Member 1344978425-Oct-18 1:44 
AnswerRe: STOP VALIDATION Pin
Afzaal Ahmad Zeeshan25-Oct-18 3:40
professionalAfzaal Ahmad Zeeshan25-Oct-18 3:40 
Questionno me funciona funcion autocomplete Jquery Pin
serenimus20-Oct-18 9:53
serenimus20-Oct-18 9:53 
AnswerRe: no me funciona funcion autocomplete Jquery Pin
Nelek20-Oct-18 9:59
protectorNelek20-Oct-18 9:59 
QuestionMap JSON data file with dates and multiple string value pairs to Angular/Chart.js Pin
Member 1201357914-Oct-18 23:08
Member 1201357914-Oct-18 23:08 
Questionaspx file don't open in chrome Pin
anasr200010-Oct-18 3:22
professionalanasr200010-Oct-18 3:22 
Questiontest regexep javascript Pin
Alboyz5-Oct-18 5:31
Alboyz5-Oct-18 5:31 
AnswerRe: test regexep javascript Pin
Richard Deeming5-Oct-18 5:48
mveRichard Deeming5-Oct-18 5:48 
GeneralRe: test regexep javascript Pin
Alboyz5-Oct-18 6:02
Alboyz5-Oct-18 6:02 
GeneralRe: test regexep javascript Pin
uxotucung9-Nov-18 4:09
uxotucung9-Nov-18 4:09 
QuestionAdding a list of files to the array and displaying them in the component Pin
Member 140077214-Oct-18 5:33
Member 140077214-Oct-18 5:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.