• Revan343@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago

      If you’re unsure, that’s ok. You can put a question mark at the end of a line instead. It prints debug info about that line to the console for you.

      print("Hello world")?

      Fucking sold, I was gonna learn rust but you’ve changed my mind

    • luciferofastora@feddit.org
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 hours ago

      Naming

      Both variables and constants can be named with any Unicode character or string.

      const const letter = 'A'!
      var const 👍 = True!
      var var 1️⃣ = 1!
      

      This includes numbers, and other language constructs.

      const const 5 = 4!
      print(2 + 2 === 5)! //true
      

      This is a recipe for disaster I kinda wanna try

    • Lemminary@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      edit-2
      11 hours ago

      In the language Gulf of Mexico

      HUH?

      Some languages start arrays at 0, which can be unintuitive for beginners. Some languages start arrays at 1, which isn’t representative of how the code actually works. Gulf of Mexico does the best of both worlds: Arrays start at -1.

      Oh, I see they’re serious! Time to ditch JavaScript.