Add jQuery or JavaScript on Magento 2

How to use custom jquery / javascript in magento 2

require([‘jquery’, ‘jquery/ui’], function($){

jQuery(document).ready( function() {
/ad you JavaScript code here/
})

})