• @breadsmasher
      link
      English
      89 months ago

      doesnt have print nor allow variable declaration without keywords

      • unalivejoy
        link
        fedilink
        English
        259 months ago

        print() will print the text to a physical printer with paper and everything. Don’t confuse it with console.log and use it in a loop.

        • @tourist
          link
          89 months ago

          it’s so rough learning this by accident

      • @Downcount
        link
        12
        edit-2
        9 months ago

        It would have print if it was previously declared as function.

        Also, js is as dirty as you want it to be. Keywords are indeed not necessary for declaring variables.

        • @kautau
          link
          9
          edit-2
          9 months ago

          JavaScript is the language of the assassins, with its infinitely modifiable prototypical setup

          Nothing is true

          true !== 1

          true

          true + true + true === 3

          true

          Everything is permitted

          []+[]

          ''

      • @[email protected]
        link
        fedilink
        English
        59 months ago

        Sure you can write foo = 3 in JavaScript. It’s a global variable and can be referenced as either foo or window.foo.