Posts by Roberto Guerra • 23 points
3 posts
-
0
votes1
answer148
viewsA: Is it good practice to use n to skip lines or to use a print() alone?
In those cases I always worry about doing the way that makes the code more legible, if you only need to skip two lines use: print("\n\n Meu texto") It doesn’t look bad, but if the text is something…
-
0
votes1
answer95
viewsQ: How I create an optional parameter
How can I set the second "&& bonus2" parameter as optional ? I want the ways to run if: (bonus1 && bonus2 == true) or (bonus1 == true) It needs to be a parameter that if I put it in…
-
1
votes1
answer111
viewsQ: Reuse a function
Can someone help me in how I reuse the functions to simplify the code and make it cleaner ? function bonusPL(){ var bonusPL = document.getElementById("bonusPL");// seleciona o elemento pai var…