Click here to Skip to main content
15,881,204 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: using javascript geoplugin to geolocalize Pin
Member 1480782320-Apr-20 7:45
Member 1480782320-Apr-20 7:45 
GeneralRe: using javascript geoplugin to geolocalize Pin
Richard MacCutchan20-Apr-20 21:37
mveRichard MacCutchan20-Apr-20 21:37 
AnswerRe: using javascript geoplugin to geolocalize Pin
ZurdoDev20-Apr-20 6:45
professionalZurdoDev20-Apr-20 6:45 
GeneralRe: using javascript geoplugin to geolocalize Pin
Member 1480782320-Apr-20 6:52
Member 1480782320-Apr-20 6:52 
GeneralRe: using javascript geoplugin to geolocalize Pin
ZurdoDev20-Apr-20 7:08
professionalZurdoDev20-Apr-20 7:08 
GeneralRe: using javascript geoplugin to geolocalize Pin
Member 1480782320-Apr-20 7:43
Member 1480782320-Apr-20 7:43 
AnswerRe: using javascript geoplugin to geolocalize Pin
layarfilm215-May-20 3:01
layarfilm215-May-20 3:01 
QuestionSuper simple for everyone else... Pin
JaHowler17-Apr-20 12:49
JaHowler17-Apr-20 12:49 
I'm just getting started and learning through a book and this code won't run on google, was wondering why and what I needed to do to fix it. Thank you in advance.

JavaScript
<pre>
function zeroPad(number, width) {
    let string = String(number);
    while (string.length < width){
        string = "0" + string;
    }
    return string;
}

function printFarmInventory(cows, chickens, pigs) {
    console.log(`${zeroPad(cows, 3)} Cows`);
    console.log(`${zeroPad(chickens, 3)} Chickens`);
    console.log(`${zeroPad([pigs], 3)} Pigs`);
}

printFarmInventory(7, 16, 3);




AnswerRe: Super simple for everyone else... Pin
Jin Vincent Necesario17-Apr-20 19:35
professionalJin Vincent Necesario17-Apr-20 19:35 
GeneralRe: Super simple for everyone else... Pin
JaHowler18-Apr-20 8:24
JaHowler18-Apr-20 8:24 
AnswerRe: Super simple for everyone else... Pin
Richard Deeming20-Apr-20 0:44
mveRichard Deeming20-Apr-20 0:44 
QuestionClick ok button in alert then chaining methods. Pin
Member 1265872416-Apr-20 12:00
Member 1265872416-Apr-20 12:00 
AnswerRe: Click ok button in alert then chaining methods. Pin
Richard Deeming17-Apr-20 4:00
mveRichard Deeming17-Apr-20 4:00 
Questionwhat is javascript and what can I make with it? Pin
Rapid Spray16-Apr-20 1:00
professionalRapid Spray16-Apr-20 1:00 
AnswerRe: what is javascript and what can I make with it? Pin
dioscarey17-Apr-20 7:11
dioscarey17-Apr-20 7:11 
QuestionHow to use Open Street map or any other Map Offline with web application Pin
Member 1451287515-Apr-20 1:29
Member 1451287515-Apr-20 1:29 
QuestionRe: How to use Open Street map or any other Map Offline with web application Pin
Richard MacCutchan15-Apr-20 1:52
mveRichard MacCutchan15-Apr-20 1:52 
AnswerRe: How to use Open Street map or any other Map Offline with web application Pin
Member 1451287515-Apr-20 2:20
Member 1451287515-Apr-20 2:20 
GeneralRe: How to use Open Street map or any other Map Offline with web application Pin
Richard MacCutchan15-Apr-20 2:29
mveRichard MacCutchan15-Apr-20 2:29 
GeneralRe: How to use Open Street map or any other Map Offline with web application Pin
Member 1451287515-Apr-20 2:32
Member 1451287515-Apr-20 2:32 
GeneralRe: How to use Open Street map or any other Map Offline with web application Pin
Richard MacCutchan15-Apr-20 2:40
mveRichard MacCutchan15-Apr-20 2:40 
GeneralRe: How to use Open Street map or any other Map Offline with web application Pin
Member 1451287515-Apr-20 2:48
Member 1451287515-Apr-20 2:48 
QuestionRe: How to use Open Street map or any other Map Offline with web application Pin
Richard MacCutchan15-Apr-20 3:06
mveRichard MacCutchan15-Apr-20 3:06 
QuestionHow to read Doc or Pdf file using javascript or jquery Pin
Member 1261817013-Apr-20 23:05
Member 1261817013-Apr-20 23:05 
QuestionRead email from outlook and display on website javascripts Pin
Member 147950937-Apr-20 3:31
Member 147950937-Apr-20 3:31 

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.