DEV Community

Andrey Frolov
Andrey Frolov

Posted on

2 2

Look into base types

So nothing special here

There are bunch of data types:

  • floats

Numbers with a floating point

1.1
1.2
Enter fullscreen mode Exit fullscreen mode
  • ints
300_000
1
Enter fullscreen mode Exit fullscreen mode

OCaml as ruby, elixir does, allow you to place underscores in the middle of numeric literals to improve readability. Note that underscores can be placed anywhere within a number, not just every three digits.

  • booleans
(1 < 2) = false;;
Enter fullscreen mode Exit fullscreen mode
  • chars
"a";;
Enter fullscreen mode Exit fullscreen mode
  • strings (immutable)
"Hello";;
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
yawaramin profile image
Yawar Amin

Hello, char type uses single quote: 'a'.

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay