Answers for "Javascript:"

0

... javascript

/* Spread syntax ( ex. ...arrayName) allows an iterable such as an array expression or string 
to be expanded in places where zero or more arguments (for function calls) 
elements (for array literals) are expected, or an object expression to be 
expanded in places where zero or more key-value pairs (for object literals) 
are expected. */


//example
function sum(x, y, z) {
  return x + y + z;
}
Posted by: Guest on May-10-2020
0

Javascript:

console.log(eval('2 + 2'));
// expected output: 4

console.log(eval(new String('2 + 2')));
// expected output: 2 + 2

console.log(eval('2 + 2') === eval('4'));
// expected output: true

console.log(eval('2 + 2') === eval(new String('2 + 2')));
// expected output: false
Posted by: Guest on June-17-2021
-1

Javascript:

local Manager = game:GetService("VirtualInputManager")
 
local Fol = Instance.new("Folder", game.Workspace)
Fol.Name = "Folder"
 
Fol.ChildAdded:connect(function(child)
if child.Value == "Money" then
wait()
child:Destroy()
 
game.ReplicatedStorage.Transactions.ClientToServer.Donate:InvokeServer(game.Players.LocalPlayer, game.Players.LocalPlayer.leaderstats.Money.Value, 1)
 
elseif child.Value == "Load" then
wait()
child:Destroy()
repeat
game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(-1)
wait(1)
until game.Players.LocalPlayer.leaderstats.Money.Value == 20
game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(game.Players.LocalPlayer.CurrentSaveSlot.Value)
elseif child.Value == "Save" then
wait()
child:Destroy()
game.ReplicatedStorage.LoadSaveRequests.RequestSave:InvokeServer(game.Players.LocalPlayer.CurrentSaveSlot.Value)
end
end)
 
function Call(VAL)
local String = Instance.new("StringValue")
String.Value = VAL
String.Parent = Fol
end
local CurrentMoney
 
function MoneyDupe(Times)
    for i = 1, Times do
        if game.Players.LocalPlayer.CurrentSaveSlot.Value ~= -1 then
            CurrentMoney = game.Players.LocalPlayer.leaderstats.Money.Value
            local DupeSlot = game.Players.LocalPlayer.CurrentSaveSlot.Value
            repeat
                Call("Money")
                wait(1)
            until game.Players.LocalPlayer.leaderstats.Money.Value == 0
            wait(59)
            Call("Load")
            repeat
                wait(0.1)
            until game:GetService("Players").LocalPlayer.PlayerGui.PropertyPurchasingGUI.SelectPurchase.Visible == true
                wait(1.2)
            Manager:SendKeyEvent(true,"E",false,game)
            repeat
                wait(0.1)
            until game:GetService("Players").LocalPlayer.PlayerGui.PropertyPurchasingGUI.ConfirmPurchase.Visible == true
            wait(0.5)
            Manager:SendKeyEvent(true,"E",false,game) 
            repeat
                wait(0.1)
            until game.Players.LocalPlayer.leaderstats.Money.Value > CurrentMoney
            for i = 1, 3 do
            Call("Save")
            wait(0.1)
            end
        end
    end
end
 
MoneyDupe(1)   sw
Posted by: Guest on June-17-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language