Posts

Showing posts from November, 2023

Today I have learned Bootstrap image and button in javascript

Image
 Bootstrap image and button in javascript Buttons Use Bootstrap’s custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more. Button tags The  .btn  classes are designed to be used with the  <button>  element. However, you can also use these classes on  <a>  or  <input>  elements (though some browsers may apply a slightly different rendering). When using button classes on  <a>  elements that are used to trigger in-page functionality (like collapsing content), rather than linking to new pages or sections within the current page, these links should be given a  role="button"  to appropriately convey their purpose to assistive technologies such as screen readers. Link   Button       Images Documentation and examples for opting images into responsive behavior (so they never become larger than their parent elements) and add lightweigh...

Today I have solved the problem in javascript

Image
  Write a generator function that returns a generator object which yields the  fibonacci sequence .

Today I have learned Boostarp text color and text background color in javascript

Image
 Boostarp text color and text background color in javascript   Bootstrap text color is a set of colors that can be used to change the font's color. A text area can also be set up to change color when a mouse hovers over it. Similar to the contextual text color classes, set the background of an element to any contextual class. Background utilities  do not set  color , so in some cases you’ll want to use  .text-*   color utilities . Contextual text classes also work well on anchors with the provided hover and focus states.  Note that the  .text-white  and  .text-muted  class has no link styling. Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. Background utilities  do not set  color , so in some cases you’ll want to use  .text-*  utilities.   < p class = "text-success" > I am...

Today I have solved the problem in javascript

Image
  Given an integer array  arr  and a filtering function  fn , return a filtered array  filteredArr .

Today I have learned Bootstarp table in javascript

Image
 Bootstarp Table: Due to the widespread use of tables across third-party widgets like calendars and date pickers, we’ve designed our tables to be  opt-in . Just add the base class  .table  to any  <table> , then extend with custom styles or our various included modifier classes. Using the most basic table markup, here’s how  .table -based tables look in Bootstrap.  All table styles are inherited in Bootstrap 4 , meaning any nested tables will be styled in the same manner as the parent. The Bootstrap Table plugin displays data in a tabular format, via data attributes or JavaScript. We can also use remote URL data by setting data-url="data1.json" on a normal table. You can also add pagination, search, and sorting to a table like the following table. Call a bootstrap table with id table via JavaScript.   < table class = "table table-bordered" >     < thead...

Today I have solved the problem in javascript

Image
  Given an integer array  arr  and a mapping function  fn , return a new array with a transformation applied to each element.

Today I have learned class constructor in javascript

Image
 Class Construtor The  constructor  method is a special method of a  class  for creating and initializing an object instance of that class. There are some additional syntax restrictions: A class method called  constructor  cannot be a  getter ,  setter ,  async , or  generator . A class cannot have more than one  constructor  method. Description A constructor enables you to provide any custom initialization that must be done before any other methods can be called on an instantiated object. Using  new  on a class goes through the following steps: (If it's a derived class) The  constructor  body before the  super()  call is evaluated. This part should not access  this  because it's not yet initialized. (If it's a derived class) The  super()  call is evaluated, which initializes the parent class through the same process. The current class's  fields  are initialized. ...

Today I have solved the problem in javascript

Image
  Given an array of functions  [f 1 , f 2 , f 3 , ..., f n ] , return a new function  fn  that is the  function composition  of the array of functions.

Today I have learned map in javascript

Image
 map in javascript The map is a collection of elements where each element is stored as a  Key, value  pair. Map objects can hold both objects and primitive values as either key or value. When we iterate over the map object it returns the key, and value pair in the same order as inserted.  Map() constructor  is used to create Map in JavaScript. Map  object provided by  ES6 . A key of a Map may occur once, which will be unique in the map’s collection. There are slight advantages to using a map rather than an object. Accidental Keys & Security:  No default keys are stored, only contain what’s explicitly put into them. Because of that, it’s safe to use. Key Types & Order:  It can be any value as a key function, object anything. And the order is straightforward way in the order of entry insertion. Size:  Because of the size property a map can be easily retrieved. Performance:  Any operation can be performed on math so easily in a...

today I have solved the problem in javascript

Image
  Given an integer array  nums , a reducer function  fn , and an initial value  init , return a  reduced  array.

Today I have solved the problems in javascript

Image
  Write code that enhances all arrays such that you can call the  array.last()  method on any array and it will return the last element. If there are no elements in the array, it should return  -1 .