Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is a gap in JS?

Status
Not open for further replies.

0211

Technical User
Oct 14, 2003
35
US
Hi everyone:
What does gap do in JS? Is this the same as <BR> in HTML? Here is a small script with gap in it and I want no space between these 2 lines:
ordval+=&quot;\nTotal Gift Cost: &quot;+curr+(Math.round(gift_cost*100)/100).toFixed(2)+gap;
ordval+=&quot;Overall Total Cost: &quot;+(Math.round((flyer_total*100)+(gift_cost*100))/100).toFixed(2);

Thanks. I hope I am clear!!!
 
&quot;gap&quot;? Never heard of it. &quot;\n&quot; causes a new line. Why not remove it from your code?

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Could be \t (horizontal tab) too. Looks like 'gap' is a variable which may have been inititialised earlier, Look for a line like:

var gap = String.fromCharCode(??);

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Just don't fall into it -- it's anti-stylish.

Cheers,


[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top