Message from JavaScript discussions

August 2020

— Can anybody help me here quickly? need to include math.round{}

— 

Encoded_message = encodeURIComponent(:red\\_circle: \\*\\*${symbol} (${exchange}) - ${quantity*-1}\\*\\* sold at ${price} ${base}${special_msg});

this is the code snipped, want to include it at {quanity*-1}

— And.. what is stopping you from doing it?

— I dont know where

— I want to round ${quanity*-1} but I have no idea where to include it in the code

— Functions wrap values. and within tagged templates you can also apply functions.

— Just like you would use encodeURIComponent

— Can you help me? I have no javascript skills :D

— I just gave you the solution

— Oh wait.. it didn't send

— Math.round(quantity * -1)

— Encoded_message = math.round{encodeURIComponent(:red\\_circle: \\*\\*${symbol} (${exchange}) - ${quantity*-1}\\*\\* sold at ${price} ${base}${special_msg})};

Message permanent page