When a beginner asks you "when do I use semi-colons?" would you rather say this?
// what people who say "use semicolons!!" say
class Foo {
prop = {
}; // yes
function keepTrying(otherArgs, promise) { | |
promise = promise||new Promise(); | |
// try doing the important thing | |
if(success) { | |
promise.resolve(result); | |
} else { | |
setTimeout(function() { | |
keepTrying(otherArgs, promise); |
When a beginner asks you "when do I use semi-colons?" would you rather say this?
// what people who say "use semicolons!!" say
class Foo {
prop = {
}; // yes
#!/usr/bin/env ruby | |
verbose = ARGV[0] == '-v' | |
def colorize(text, color_code) | |
"\e[#{color_code}m#{text}\e[0m" | |
end | |
def red(text); colorize(text, 31); end | |
def green(text); colorize(text, 32); end |
require 'aws-sdk' | |
require 'securerandom' | |
require 'pp' | |
$dynamo = AWS::DynamoDB.new( | |
access_key_id: 'blah', | |
secret_access_key: 'blah/blah/blah', | |
) | |
$table = $dynamo.tables['some-table-name-here'] |