Community - What kind of a programmer are you?

There are two types of programmers:

#1

if(something)
{
do this
}

#2

if(something){
do this
}

Which one are you?

  • #1
  • #2

0 voters

What type of programmer are you?
#1:

if(!variable){
}

#2:

if(variable==undefined){
}
  • #1
  • #2

0 voters

Which do you prefer? Install an npm package to perform a simple operation, or write it on your own:

#1

function isOdd(number) {
  return number % 2 === 1;
}

isOdd(5) => true

#2 (npm install is-odd)

const isOdd = require("is-odd");

isOdd(4) => false
  • #1
  • #2

0 voters

A scenario y’all missed.

What kind of a programmer are you?

#1

if (x === 0) {
   // hi
} 

#2

if (x == 0) {
   // bye
} 
  • #1
  • #2

0 voters

Both of these are bad? U should use typeof.

Which one are you? :slight_smile:

#1.

for (x = 0, i < 10, x++;) {
// code
}

#2

function loop() {
// code
loop()
}
loop()

#3

while (i <= 10) {
// code
}
  • #1
  • #2
  • #3

0 voters

How do you write your HTML?

  • <doctype html>
    <head>
    <title>hi</title>
    </head>
    <body>
    <p>Hello</p>
    </body>
    </html>

  • <doctype html>
    <head>
    <title>hi</title>
    </head>
    <body>
    <script>
    document.getElementsByTagName("BODY")[0].innerHTML = "<p>Hello World!</p>";
    </script>
    </body>
    </html>

0 voters

Edit: why does no one like the js DOM? :sob: :cry:

How do you start HTML?

  • <!DOCYTPE html>
  • <!doctype html>

0 voters

Spelt doctype wrong and I don’t use it at all. Browsers adds it automatically

Dang, did spell it wrong. I just use it, its good practice.

1 Like