Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
How use JSFiddle and assign string

I'm a newbie with JavaScript and want to use JSFiddle to start simple and assign a string and print it. When I add the string assignment, it stops printing the hello world part.

Fiddle with string. Eventually I want to import dayjs and format with dayjs to do some testing (can I do that in jsfiddle). Why is the string assignment making the output go away? This is my first time sharing a jsfiddle, so I'll share what's in it as well.

Fiddle includes:

Javascript:

function out()
{
    var args = Array.prototype.slice.call(arguments, 0);
    document.getElementById('output').innerHTML += args.join(" ") + "\n";
}
var stringDate = “23-SEP-2021 00:00”;
out("Hello world!");
out("Your lottery numbers are:", Math.random(), 999, Math.PI);
out("Today is", new Date());

html:

<pre id="output"></pre>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!