Function Parameters with Node.js Promise

Function Parameters with Node.js Promise

I'm using&nbsp;<a href="https://www.npmjs.com/package/blockexplorer#blockexplorerblockhash" target="_blank">blockexplorer</a>&nbsp;API for blockchain, and I want to get block data based on specific hash (This hash should be taken from another function).

I'm using blockexplorer API for blockchain, and I want to get block data based on specific hash (This hash should be taken from another function).

I'm new with using Promise, So can anyone help me to get the block data?

This is my code:

const be = require('blockexplorer');

be.block(be.blockIndex(0)) .then((result) => { console.log(result) }) .catch((err) => { throw err })

Also, I've tried another way with using nested Promise but it didn't work.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Top 7 Most Popular Node.js Frameworks You Should Know

Node.js is an open-source, cross-platform, runtime environment that allows developers to run JavaScript outside of a browser. In this post, you'll see top 7 of the most popular Node frameworks at this point in time (ranked from high to low by GitHub stars).

Node.js for Beginners - Learn Node.js from Scratch (Step by Step)

Node.js for Beginners - Learn Node.js from Scratch (Step by Step) - Learn the basics of Node.js. This Node.js tutorial will guide you step by step so that you will learn basics and theory of every part. Learn to use Node.js like a professional. You’ll learn: Basic Of Node, Modules, NPM In Node, Event, Email, Uploading File, Advance Of Node.

Create a global finance blockchain application with Node.js

Create a global finance blockchain application with Node.js smart contracts (replay).Watch Rahell Zubairy develop a Node.js smart contract and web app for a Global Finance with blockchain use case.