MachineCode | 159 Posted April 14, 2020 Share Posted April 14, 2020 3 hours ago, Gloves said: That's easy to fix using javascripts built in trim() function, which removes trailing and leading spaces. That's exactly why I did that. Left a trailing space on Fizz and then trimmed whatever the resulting string was. 2 Link to comment Share on other sites More sharing options...
Code Monkey | 2,006 Posted April 15, 2020 Share Posted April 15, 2020 (edited) PHP $fizz = $input % 3 ? "" : "fizz"; $buzz = $input % 5 ? "" : "buzz"; echo $fizz . " " . $buzz; Edited April 15, 2020 by Code Monkey Link to comment Share on other sites More sharing options...
MachineCode | 159 Posted April 15, 2020 Share Posted April 15, 2020 22 hours ago, Reed Rothchild said: The obvious solution is to build each one within layers and layers of libraries, put everything on one line, embed as many different languages as possible within your code, and have the user's terminal go apeshit for ages when the thing is running. Then you'll stand out from the crowd. We call that "Modern Style" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now