Hi,
You can follow this example to know how you can perform a function of assigning block expression below:
scala> val x = {val a=100; val b=200; a+b}
Here is the example you can see:
Remember a single important thing that the last expression you provide that will be the return type of the particular block.