Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Other Programming › Web Languages › How do i make a space between vars in JavaScript?

QuestionHow do i make a space between vars in JavaScript?

Posts 1–7 of 7 · Page 1 of 1
doger057
doger057
How do i make a space between vars in JavaScript?
hey guys, I don't actually know whether this is supposed to be in this forum or not. anyways, here is the code and how it looks like if opening it in the browser. im a total noob so don't be triggered XD im trying to get a space between the vars.
Code:
var r1 ="999999999999999999999999999999999999999999999999999999999999999999999"; // makes var with numbers
var l1 = r1.length; // makes a var. it doesnt calculate it just counts the length of the numbers. this is 69 because there are 69  9's
document.write(l1); // it writes it on your screen/executes the code? im not sure what is this im 12
var r2 ="moop"; // makes a var with letters by using "" i think. i still use it for numbers aswell anyway.
var s1 = r2.substring(1, 4) // it only starts showing from the second letter to the fourth. that will make oop
document.write(s1); // same as the above. only its a different var





Thanks

- - - Updated - - -

It might be hard to read the code btw, but I attached another image so you can easily see the problem and the code


- - - Updated - - -

still looking for answers
test.PNG 69.PNG
#1 · edited 7y ago · 7y ago
MI
MikeRohsoft
what exactly is the question?
#2 · 7y ago
HE
heiron70
What do you mean by space? the space in javascript is this "&nbsp"
#3 · 7y ago
doger057
doger057
Quote Originally Posted by MikeRohsoft View Post
what exactly is the question?
well, im noob so i dont even know it that well,
but since i used length, adding a space to the number that displays wont matter, since then it will simply show 70 instead of 69
im probably looking for a space that doesnt actually count with length. so i will have a space between 69 and oop yet it shouldnt change the 69 to 70

- - - Updated - - -

Quote Originally Posted by heiron70 View Post
What do you mean by space? the space in javascript is this "&nbsp"
maybe that could work, but ill search first on how I should use it since I don't actually know how.
since I have tried using it real quick but everywhere I place it, whatever comes after &nbsp doesn't display?
#4 · edited 7y ago · 7y ago
MI
MikeRohsoft
Quote Originally Posted by doger057 View Post
well, im noob so i dont even know it that well,
but since i used length, adding a space to the number that displays wont matter, since then it will simply show 70 instead of 69
im probably looking for a space that doesnt actually count with length. so i will have a space between 69 and oop yet it shouldnt change the 69 to 70

- - - Updated - - -


maybe that could work, but ill search first on how I should use it since I don't actually know how.
since I have tried using it real quick but everywhere I place it, whatever comes after * doesn't display?
oohh, now i understand what u want xD sweet
i think you are trying to do that:
Code:
var r1 ="999999999999999999999999999999999999999999999999999999999999999999999"; 
var l1 = r1.length; 

var r2 ="moop"; 
var s1 = r2.substring(1, 4);

document.write(l1 + " " + s1);
if u want to create a "line feed" you have to replace " " with "<br>"
#5 · 7y ago
HE
heiron70
Mike was correct sorry didn't understand the question
Code:
document.write( "+(var1)+ " " + (var2)+ " " + (var3)+"); /* another way
and yes <br> is line feed
#6 · 7y ago
PO
power_dice
With ES6 we have what we call Template Strings. It is the same logic but mor readable. Example

Code:
const name = "John";
console.log(`Hello, ${name}!`);
// Prints: Hello, John!
And you can do logic too

Code:
console.log(`I am ${2019-1991} years old.`);
// Prints: I am 28 years old.
Good coding
#7 · 6y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • HOW WOULD I MAKE A BIG VAULT THAT WOULD CARRY 16 spacesBy R.O.T.M.G rocks in Realm of the Mad God Private Servers Help
    1Last post 8y ago
  • [How to make a space effect signature] [GIMP] [VIDEO]By blackbirdz0 in Tutorials
    5Last post 12y ago
  • How'd you make these?By Twisty in Art & Graphic Design
    1Last post 19y ago
  • how can i make game hack?!!!!By UnknownID in General Game Hacking
    2Last post 20y ago
  • Help! how do i make a jap warrock name?By gmgundamx7 in WarRock - International Hacks
    4Last post 19y ago

Tags for this Thread

None